aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Daniel Gu <[email protected]>2023-04-28 22:52:43 +0800
committerGravatar GitHub <[email protected]>2023-04-28 22:52:43 +0800
commit9936d6f998878dbdf3b89133fcb3a111c86d37ab (patch)
treeaf0c7a26962e19c6131ccb742eee73bd9d0a7ff3
parentUpdate bot/resources/tags/on-message-event.md (diff)
Update on-message-event.md
-rw-r--r--bot/resources/tags/on-message-event.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/resources/tags/on-message-event.md b/bot/resources/tags/on-message-event.md
index ae98e1495..35a841f87 100644
--- a/bot/resources/tags/on-message-event.md
+++ b/bot/resources/tags/on-message-event.md
@@ -3,9 +3,9 @@ embed:
title: "The `on_message` event"
---
-When registering the `on_message` event, prefix commands may stop working as it overrides the default behaviour of the `on_message` event.
+Registering the `on_message` event with [`@bot.event`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.event) will override the default behavior of the event. This may cause prefix commands to stop working, because they rely on the default `on_message` event.
-Instead, use [`@bot.listen`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.listen) to add a listener. Listeners get added alongside the default `on_message` event, preventing an override of on_message, and allowing prefix commands to still be invoked.
+Instead, use [`@bot.listen`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.listen) to add a listener. Listeners get added alongside the default `on_message` event, rather than overriding it, so prefix commands can still be invoked as usual:
```python
@bot.listen('on_message')