aboutsummaryrefslogtreecommitdiff
path: root/src/client/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/context.rs')
-rw-r--r--src/client/context.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/context.rs b/src/client/context.rs
index e27c134..261c8ff 100644
--- a/src/client/context.rs
+++ b/src/client/context.rs
@@ -71,7 +71,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_message(&self, ctx: Context, msg: Message) {
+ /// fn message(&self, ctx: Context, msg: Message) {
/// if msg.content == "!changename" {
/// ctx.edit_profile(|e| e.username("Edward Elric"));
/// }
@@ -122,7 +122,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_message(&self, ctx: Context, msg: Message) {
+ /// fn message(&self, ctx: Context, msg: Message) {
/// if msg.content == "!online" {
/// ctx.online();
/// }
@@ -151,7 +151,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_message(&self, ctx: Context, msg: Message) {
+ /// fn message(&self, ctx: Context, msg: Message) {
/// if msg.content == "!idle" {
/// ctx.idle();
/// }
@@ -180,7 +180,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_message(&self, ctx: Context, msg: Message) {
+ /// fn message(&self, ctx: Context, msg: Message) {
/// if msg.content == "!dnd" {
/// ctx.dnd();
/// }
@@ -210,7 +210,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_ready(&self, ctx: Context, _: Ready) {
+ /// fn ready(&self, ctx: Context, _: Ready) {
/// ctx.invisible();
/// }
/// }
@@ -241,7 +241,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_resume(&self, ctx: Context, _: ResumedEvent) {
+ /// fn resume(&self, ctx: Context, _: ResumedEvent) {
/// ctx.reset_presence();
/// }
/// }
@@ -272,7 +272,7 @@ impl Context {
///
/// struct Handler;
/// impl EventHandler for Handler {
- /// fn on_message(&self, ctx: Context, msg: Message) {
+ /// fn message(&self, ctx: Context, msg: Message) {
/// let args = msg.content.splitn(2, ' ').collect::<Vec<&str>>();
///
/// if args.len() < 2 || *unsafe { args.get_unchecked(0) } != "~setgame" {
@@ -312,7 +312,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_ready(&self, ctx: Context, _: Ready) {
+ /// fn ready(&self, ctx: Context, _: Ready) {
/// ctx.set_game_name("test");
/// }
/// }
@@ -351,7 +351,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_ready(&self, ctx: Context, _: Ready) {
+ /// fn ready(&self, ctx: Context, _: Ready) {
/// use serenity::model::OnlineStatus;
///
/// ctx.set_presence(None, OnlineStatus::Idle);
@@ -370,7 +370,7 @@ impl Context {
/// struct Handler;
///
/// impl EventHandler for Handler {
- /// fn on_ready(&self, context: Context, _: Ready) {
+ /// fn ready(&self, context: Context, _: Ready) {
/// use serenity::model::{Game, OnlineStatus};
///
/// let game = Game::playing("Heroes of the Storm");