aboutsummaryrefslogtreecommitdiff
path: root/examples/01_basic_ping_bot/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-10-22 18:01:42 -0700
committerZeyla Hellyer <[email protected]>2017-10-22 18:01:42 -0700
commitb328b3e09b0095abb54530dc4d50db6b4e3e1779 (patch)
tree9af675bd9a608205dd2c29975038822327601a22 /examples/01_basic_ping_bot/src
parentRemove setting of the afk field in shards (diff)
downloadserenity-b328b3e09b0095abb54530dc4d50db6b4e3e1779.tar.xz
serenity-b328b3e09b0095abb54530dc4d50db6b4e3e1779.zip
Remove `on_` prefix to EventHandler tymethods
It was voted that the `on_` prefix is unnecessary, so these have been dropped.
Diffstat (limited to 'examples/01_basic_ping_bot/src')
-rw-r--r--examples/01_basic_ping_bot/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/01_basic_ping_bot/src/main.rs b/examples/01_basic_ping_bot/src/main.rs
index 4c2f35c..cf0e6db 100644
--- a/examples/01_basic_ping_bot/src/main.rs
+++ b/examples/01_basic_ping_bot/src/main.rs
@@ -12,7 +12,7 @@ impl EventHandler for Handler {
//
// Event handlers are dispatched through multi-threading, and so multiple
// of a single event can be dispatched simultaneously.
- fn on_message(&self, _: Context, msg: Message) {
+ fn message(&self, _: Context, msg: Message) {
if msg.content == "!ping" {
// Sending a message can fail, due to a network error, an
// authentication error, or lack of permissions to post in the
@@ -30,7 +30,7 @@ impl EventHandler for Handler {
// private channels, and more.
//
// In this case, just print what the current user's username is.
- fn on_ready(&self, _: Context, ready: Ready) {
+ fn ready(&self, _: Context, ready: Ready) {
println!("{} is connected!", ready.user.name);
}
}