diff options
| author | Zeyla Hellyer <[email protected]> | 2017-11-16 10:34:56 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-11-16 10:34:56 -0800 |
| commit | ee5f4554e00343d638d1129e459850bc69d0bf39 (patch) | |
| tree | 5efc9a30dc45babc7999ae1cd93c84e08243d00a /examples/01_basic_ping_bot/src | |
| parent | impl From<&Path> for http::AttachmentType (diff) | |
| download | serenity-ee5f4554e00343d638d1129e459850bc69d0bf39.tar.xz serenity-ee5f4554e00343d638d1129e459850bc69d0bf39.zip | |
Clarify some example 01 documentation
Diffstat (limited to 'examples/01_basic_ping_bot/src')
| -rw-r--r-- | examples/01_basic_ping_bot/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/01_basic_ping_bot/src/main.rs b/examples/01_basic_ping_bot/src/main.rs index a900cc2..534da71 100644 --- a/examples/01_basic_ping_bot/src/main.rs +++ b/examples/01_basic_ping_bot/src/main.rs @@ -7,11 +7,11 @@ use std::env; struct Handler; impl EventHandler for Handler { - // Set a handler for the `on_message` event - so that whenever a new message + // Set a handler for the `message` event - so that whenever a new message // is received - the closure (or function) passed will be called. // - // Event handlers are dispatched through multi-threading, and so multiple - // of a single event can be dispatched simultaneously. + // Event handlers are dispatched through a threadpool, and so multiple + // events can be dispatched simultaneously. fn message(&self, _: Context, msg: Message) { if msg.content == "!ping" { // Sending a message can fail, due to a network error, an @@ -24,7 +24,7 @@ impl EventHandler for Handler { } } - // Set a handler to be called on the `on_ready` event. This is called when a + // Set a handler to be called on the `ready` event. This is called when a // shard is booted, and a READY payload is sent by Discord. This payload // contains data like the current user's guild Ids, current user data, // private channels, and more. |