feat(bot): ✨ Add members intent.

This commit is contained in:
Nyeki.py
2024-10-18 23:31:01 -03:00
parent 686263799e
commit bac90e531b
+5 -2
View File
@@ -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.