Discord Bot Python Command

Hello, when i type the command: “!hello” in the discord chat, then i doesn’t become a answer from the bot.

What is false?

ummm, make sure the following:

  • you have a token stored in env
  • you have invited the bot to the server with correct perms (read/make messages)

I’m not super familiar but try changing @client.command() to @client.command(name="hello")

Where is the .env file? I doesn’t have it

1 Like

no, I meant in your secrets tab

You are not setting the intents properly.

You either configure to use all intents as

intents = discord.Intents.default()
intents = discord.Intents.all()

or just the message

intents = discord.Intents.default()
intents.message_content = True

oh lol I always thought defaults allowed for message read XD my bad for confusion

Thank you, it works.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.