Skip to content

Commit 7b99a40

Browse files
authored
Added intents
1 parent d2a0ce5 commit 7b99a40

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

bot.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,33 @@
1414
else:
1515
import config
1616

17-
bot = Bot(command_prefix=config.BOT_PREFIX)
17+
"""
18+
Setup bot intents (events restrictions)
19+
For more information about intents, please go to the following websites:
20+
https://discordpy.readthedocs.io/en/latest/intents.html
21+
https://discordpy.readthedocs.io/en/latest/intents.html#privileged-intents
22+
"""
23+
intents = discord.Intents().default()
24+
intents.messages = True
25+
intents.reactions = True
26+
intents.presences = True
27+
intents.members = True
28+
intents.guilds = True
29+
intents.emojis = True
30+
intents.bans = True
31+
intents.guild_typing = False
32+
intents.typing = False
33+
intents.dm_messages = False
34+
intents.dm_reactions = False
35+
intents.dm_typing = False
36+
intents.guild_messages = True
37+
intents.guild_reactions = True
38+
intents.integrations = True
39+
intents.invites = True
40+
intents.voice_states = False
41+
intents.webhooks = False
42+
43+
bot = Bot(command_prefix=config.BOT_PREFIX, intents=intents)
1844

1945
# The code in this even is executed when the bot is ready
2046
@bot.event

0 commit comments

Comments
 (0)