- 146
- 8
делаю селфбота, мне нужно что бы я указывал в коде ID войса и бот к нему подключался.
мои попытки :
выдает ошибку :
мои попытки :
Python:
@client.command()
async def join(ctx):
channel.id = '1067526271661256787'
await channel.connect()
Python:
@client.command()
async def join(ctx, pon):
channel.id = (pon)
await channel.connect()
выдает ошибку :
Код:
Ignoring exception in command join:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Microsoft\Новая папка (3)\kreora\kreora (фикс крч).py", line 73, in join
channel.id = (pon)
NameError: name 'channel' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\user\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\user\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\user\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: NameError: name 'channel' is not defined