
02.12.2022, 23:34
|
|
Познающий
Регистрация: 21.05.2020
Сообщений: 39
С нами:
3147962
Репутация:
8
|
|
Как исправить это?
bot discord:
Код:
import
discord
import
json
from
discord
.
ext
import
commands
file
=
open
(
'config.json'
,
'r'
)
config
=
json
.
load
(
file
)
bot
=
commands
.
Bot
(
command_prefix
=
config
[
'prefix'
]
)
@bot.command
(
name
=
'ping'
)
async
def
ping
(
ctx
)
:
await
ctx
.
send
(
f'{ctx.author.mention}pong'
)
bot
.
run
(
config
[
'token'
]
)
Сообщение от Спойлер
Traceback (most recent call last):
File "C:\Users\cawa1\Desktop\Discord Bot\main.py", line 9, in
bot = commands.Bot(command_prefix=config['prefix'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BotBase.__init__() missing 1 required keyword-only argument: 'intents'

|
|
|