Changed the intents and member cache

- Now only intents GUILDS, GUILD_MESSAGES, DIRECT_MESSAGES.
- Member cache now from intents.

Fixes #296
This commit is contained in:
0x5c 2020-10-30 06:14:14 -04:00
parent e8bb18ea8c
commit 5dab93b7d3
No known key found for this signature in database
GPG Key ID: A57F71C3176B9581
1 changed files with 7 additions and 9 deletions

16
main.py
View File

@ -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)