From fa3b50e835ae63edd3a016d248a19f321ce0f86b Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sat, 31 Oct 2020 13:08:15 +0100 Subject: 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 <53477086+Senjan21@users.noreply.github.com> --- bot/bot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bot/bot.py') 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 -- cgit v1.2.3