Discord bot with python

Viewed 37

so i'm coding a discord bot with python. when i type this:

client = commands.Bot(command_prefix= "!")

and run this comes up:

TypeError: BotBase.__init__() missing 1 required keyword-only argument: 'intents'
1 Answers

You forgot to add intents into parameters.

intents = discord.Intents.default()
client = commands.Bot(command_prefix='!', intents=intents)

Or you can use pip install discord.py==1.7.3 which doesn't require you to pass in intents as a parameter.

Related