From 97efc1c655f9b6553d79cd24351f8030d171c007 Mon Sep 17 00:00:00 2001 From: Daniel Gu Date: Fri, 28 Apr 2023 22:28:02 +0800 Subject: Update bot/resources/tags/on-message-event.md Co-authored-by: Canttuchdiz <75583497+Canttuchdiz@users.noreply.github.com> --- bot/resources/tags/on-message-event.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/on-message-event.md b/bot/resources/tags/on-message-event.md index dde1c7b3b..ae98e1495 100644 --- a/bot/resources/tags/on-message-event.md +++ b/bot/resources/tags/on-message-event.md @@ -3,7 +3,7 @@ embed: title: "The `on_message` event" --- -When defining an `on_message` event handler, prefix commands may stop working as it overrides the default behaviour of 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. 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. -- cgit v1.2.3