M
M
Mel0dy2021-07-08 01:06:35
Python
Mel0dy, 2021-07-08 01:06:35

Why does the code give such an error?

Why does the code give such an error?

spoiler
Traceback (most recent call last):
File "путь к боту", line 226, in
bot.run(info.token)
AttributeError: 'Command' object has no attribute 'run'


I understand that the point is in the bot declaration itself. But how can I declare it differently if I have this:
bot = commands.Bot(command_prefix='~', intents=discord.Intents.all())

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Krytiu_govnocoder, 2021-07-09
@Krytiu_govnocoder

bot = commands.Bot(command_prefix = '~',intents = discord.Intents().all())
replace like this, if it doesn't help, then somewhere you didn't close the quote or didn't put the bracket ")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question