Discord.py 如何修复';创建#u通道错误请求(状态代码:400)和#x27;不和谐
这段代码没有问题。但有一天,突然,一个错误开始出现。请帮帮我。(我用了翻译)谢谢 我不知道。。对不起Discord.py 如何修复';创建#u通道错误请求(状态代码:400)和#x27;不和谐,discord.py,Discord.py,这段代码没有问题。但有一天,突然,一个错误开始出现。请帮帮我。(我用了翻译)谢谢 我不知道。。对不起 @client.command(pass\u context=True) 异步def测试(ctx): server=ctx.message.server name=“name” 等待客户端。创建_频道(服务器,“名称”,类型=discord.ChannelType.voice) 这是错误代码 Traceback (most recent call last): File "/home/yd
@client.command(pass\u context=True)
异步def测试(ctx):
server=ctx.message.server
name=“name”
等待客户端。创建_频道(服务器,“名称”,类型=discord.ChannelType.voice)
这是错误代码
Traceback (most recent call last):
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(args, **kwargs)
File "feelblue.py", line 5790, in test
await client.create_channel(server, name, type=discord.ChannelType.text)
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/client.py", line 2163, in create_channel
data = yield from self.http.create_channel(server.id, name, str(type), permission_overwrites=perms)
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/http.py", line 200, in request
raise HTTPException(r, data)
discord.errors.HTTPException: BAD REQUEST (status code: 400)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 374, in invoke
yield from injected(ctx.args, **ctx.kwargs)
File "/home/ydepong93/.local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: BAD REQUEST (status code: 400)
请看这里:
你必须使用
await ctx.guild.create_voice_channel(**kwargs)
而不是你的代码。如果您在询问之前先看一下文档,下次会更好。看一下这里:
你必须使用
await ctx.guild.create_voice_channel(**kwargs)
而不是你的代码。下一次,如果您在询问之前查看文档,会更好。您使用的是discord.py的哪个版本?我使用的是0.16.12版本。您使用的是discord.py的哪个版本?我使用的是0.16.12版本