aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Senjan21 <[email protected]>2020-09-30 20:17:22 +0200
committerGravatar Senjan21 <[email protected]>2020-09-30 20:17:22 +0200
commit7e9283260104999973301fe09859c75b87e62514 (patch)
tree6f16c5fd6998a4ae54d395187f51298037febb20
parentDeps: bump 'discord.py' to 1.5 & re-lock (diff)
Add intents setup to the bot
-rw-r--r--bot/__main__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index a07bc21d6..009f0ff27 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -47,6 +47,13 @@ loop.run_until_complete(redis_session.connect())
# Instantiate the bot.
allowed_roles = [discord.Object(id_) for id_ in constants.MODERATION_ROLES]
+intents = discord.Intents().all()
+intents.presences = False
+intents.dm_typing = False
+intents.dm_reactions = False
+intents.invites = False
+intents.webhooks = False
+intents.integrations = False
bot = Bot(
redis_session=redis_session,
loop=loop,
@@ -54,7 +61,8 @@ bot = Bot(
activity=discord.Game(name="Commands: !help"),
case_insensitive=True,
max_messages=10_000,
- allowed_mentions=discord.AllowedMentions(everyone=False, roles=allowed_roles)
+ allowed_mentions=discord.AllowedMentions(everyone=False, roles=allowed_roles),
+ intents=intents
)
# Load extensions.