aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2018-08-01 21:30:56 +0200
committerZeyla Hellyer <[email protected]>2018-08-01 12:53:45 -0700
commitdab7a8ef2aefbafac6e14027ea0dd05af530541a (patch)
tree6f2c1d5b267f07deca67baacae8ba6360624e555 /src
parentAdd From impls for Game, generify Game params (diff)
downloadserenity-dab7a8ef2aefbafac6e14027ea0dd05af530541a.tar.xz
serenity-dab7a8ef2aefbafac6e14027ea0dd05af530541a.zip
De-cringe a comment
Diffstat (limited to 'src')
-rw-r--r--src/client/dispatch.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs
index f7326bd..1cf513f 100644
--- a/src/client/dispatch.rs
+++ b/src/client/dispatch.rs
@@ -178,9 +178,9 @@ fn handle_event<H: EventHandler + Send + Sync + 'static>(
let context = context(data, runner_tx, shard_id);
- // This different channel_create dispatching is only due to the fact that
- // each time the bot receives a dm, this event is also fired.
- // So in short, only exists to reduce unnecessary clutter.
+ // Discord sends both a MessageCreate and a ChannelCreate upon a new message in a private channel.
+ // This could potentionally be annoying to handle when otherwise wanting to normally take care of a new channel.
+ // So therefore, private channels are dispatched to their own handler code.
match event.channel {
Channel::Private(channel) => {
let event_handler = Arc::clone(event_handler);