diff options
-rw-r--r-- | metricity/bot.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/metricity/bot.py b/metricity/bot.py index 476404e..b2a54ff 100644 --- a/metricity/bot.py +++ b/metricity/bot.py @@ -222,6 +222,9 @@ async def on_member_update(_before: Member, member: Member) -> None: @bot.event async def on_message(message: DiscordMessage) -> None: """Add a message to the table when one is sent providing the author has accepted.""" + if message.channel.id == BotConfig.bot_commands_channel: + await bot.process_commands(message) + if not message.guild: return @@ -248,10 +251,6 @@ async def on_message(message: DiscordMessage) -> None: created_at=message.created_at ) - if message.channel.id == BotConfig.bot_commands_channel: - await bot.process_commands(message) - - @bot.command() async def opt_in(ctx: Context) -> None: """Opt-in to the server analytics system.""" |