From 5dab93b7d3b7139ba26e1b30cd3456b869aa8d82 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Fri, 30 Oct 2020 06:14:14 -0400 Subject: [PATCH] Changed the intents and member cache - Now only intents GUILDS, GUILD_MESSAGES, DIRECT_MESSAGES. - Member cache now from intents. Fixes #296 --- main.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index 3aa95ca..548d9c5 100644 --- a/main.py +++ b/main.py @@ -45,20 +45,18 @@ loop = asyncio.get_event_loop() connector = loop.run_until_complete(conn.new_connector()) # Defining the intents -intents = discord.Intents.default() -# We don't need those -intents.bans = False -intents.emojis = False -intents.integrations = False -intents.webhooks = False -intents.invites = False -intents.voice_states = False -intents.typing = False +intents = discord.Intents.none() +intents.guilds = True +intents.guild_messages = True +intents.dm_messages = True + +member_cache = discord.MemberCacheFlags.from_intents(intents) bot = commands.Bot(command_prefix=opt.prefix, case_insensitive=True, description=info.description, help_command=commands.MinimalHelpCommand(), intents=intents, + member_cache=member_cache, loop=loop, connector=connector)