aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-10-31 13:08:15 +0100
committerGravatar kwzrd <[email protected]>2020-10-31 13:08:15 +0100
commitfa3b50e835ae63edd3a016d248a19f321ce0f86b (patch)
tree342b46b10ecf14bc110031ea7b4226ea3617bd4b
parentIntents: document which intents are privileged (diff)
Intents: use 'default' factory
Since we disable both privileged intents, we can just construct an instance with them already off. As Senjan notes, this will also future-proof us against any privileged intents added in the future. Co-authored-by: Senjan21 <[email protected]>
-rw-r--r--bot/bot.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/bot.py b/bot/bot.py
index e762f0c4..cef4c4d4 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -205,12 +205,10 @@ class SeasonalBot(commands.Bot):
_allowed_roles = [discord.Object(id_) for id_ in MODERATION_ROLES]
-_intents = discord.Intents.all()
+_intents = discord.Intents.default() # Default is all intents except for privileged ones (Members, Presences, ...)
_intents.bans = False
_intents.integrations = False
_intents.invites = False
-_intents.members = False # Privileged
-_intents.presences = False # Privileged
_intents.typing = False
_intents.webhooks = False