From bac90e531b4be68c931938805fc2dceea16de0d0 Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:31:01 -0300 Subject: [PATCH] feat(bot): :sparkles: Add members intent. --- payphone/bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/payphone/bot.py b/payphone/bot.py index 1f3a65b..3013315 100644 --- a/payphone/bot.py +++ b/payphone/bot.py @@ -10,7 +10,7 @@ from discord.ext.commands import errors from tortoise import expressions, transactions, exceptions as tortoise_exc from payphone.db import setup, models -from payphone.core import constants, exceptions, formatting, help_command +from payphone.core import constants, exceptions, formatting, help_command, config from payphone.core.redis import redis @@ -20,6 +20,9 @@ class Payphone(commands.AutoShardedBot): intents = discord.Intents.default() intents.message_content = True + if config.IS_DEBUG: + intents.members = True + super().__init__( intents=intents, command_prefix=self.get_prefix, @@ -363,7 +366,7 @@ class Payphone(commands.AutoShardedBot): elif isinstance(exception, errors.CommandNotFound): return - + elif isinstance(exception, tortoise_exc.TransactionManagementError): # Tortoise ORM bug. This may need to be logged for debugging, but for now they just # clutter the logs.