ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   Пишу бота в дискорде, но возникла проблема (https://forum.antichat.xyz/showthread.php?t=1414811)

mstrchx 29.12.2021 21:58

Пишу музыкального бота в дискорде, это мой первый раз. При окончании написание бота и проверки возникла проблема, которую я не могу решить

Цитата:


Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\Sika Bika\AppData\Local\Programs\Python\Python310\lib\s ite-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\s ite-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\s ite-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\s ite-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'
Бот успешно запустился! а работет ли команды, не знаем.


pomidorq 30.12.2021 23:14

гугл 10 секунд stackoverflow


Время: 01:55