Пишу бота в дискорде, но возникла проблема

mstrchx

Новичок
Автор темы
1
0
Пишу музыкального бота в дискорде, это мой первый раз. При окончании написание бота и проверки возникла проблема, которую я не могу решить
Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\Sika Bika\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\Sika Bika\Desktop\music bot\main.py", line 38, in play
voice.channel = discord.utils.get(server.voice_channel, name = name.channel)
AttributeError: 'Guild' object has no attribute 'voice_channel'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Sika Bika\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Sika Bika\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\Sika Bika\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Guild' object has no attribute 'voice_channel'
Бот успешно запустился! а работет ли команды, не знаем.