From a1ba26189328ce8756712fec0b07cc6ddf3ceef8 Mon Sep 17 00:00:00 2001 From: Matheus Almeida <77692412+matheus0almeida@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:00:38 -0300 Subject: [PATCH] Update main.py Added intents to bot initialization In order to comply with Discord's updated requirements, I added the necessary intents for the bot to function properly. The `intents` object is now configured to enable all events, allowing the bot to receive and handle a wider range of interactions, such as message content, member updates, and presence changes. This is required for the bot to work with specific events, particularly after recent Discord API changes. The `discord.Intents.all()` method was used to ensure all events are accessible, ensuring the bot has the required permissions to fully interact with the server. --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 440525b..91dbb7f 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,10 @@ token = YOUR_BOT_PREFIX_HERE prefix = YOUR_BOT_TOKEN_HERE -client = commands.Bot(command_prefix= prefix) +# Create an instance of Intents and enable the events your bot will listen to +intents = discord.Intents.all() #Enable all intents + +client = commands.Bot(command_prefix= prefix,intents=intents) client.remove_command("help") #to remove the default boring help command