【发布时间】:2021-02-05 08:34:41
【问题描述】:
嘿,我最近开始编码,现在我想做一个可以加入 Voice Chanel 的 Discord 机器人。当我执行此操作时:
BOT_PREFIX = '%'
bot = commands.Bot(command_prefix=BOT_PREFIX)
@bot.commmands(pass_context=True, aliases=['j', 'joi'])
async def join (ctx):
channel = ctx.message.author.voice.channel
voicechannel = await channel.connect()
出现此错误后:
Traceback (most recent call last):
File "C:\DEV\Python\Einführung\venv\lib\site-packages\discord\client.py", line 333, in _run_event
await coro(*args, **kwargs)
File "C:/DEV/Python/pythonProject1/venv/Discord Bot/Bot.py", line 23, in on_message
@bot.commmands(pass_context=True, aliases=['j', 'joi'])
AttributeError: 'Bot' object has no attribute 'commmands'
【问题讨论】: