我不知道会发生什么。 我创建了一个text_channel,但它给了我这个错误。 而且我没有发现什么是假的。 请帮我解决这个问题。
Ignoring exception in command tk:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
ret = await coro(*args, **kwargs)
File "/home/runner/FunMc/cmds/ticket.py", line 22, in tk
ticket = await guild.create_text_channel(f"questions-{r.randint(0,99999)}", overwrites=overwrites)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/guild.py", line 869, in create_text_channel
channel = TextChannel(state=self._state, guild=self, data=data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/channel.py", line 107, in __init__
self._update(guild, data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/channel.py", line 131, in _update
self._fill_overwrites(data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/abc.py", line 294, in _fill_overwrites
self._overwrites.append(_Overwrites(id=overridden_id, **overridden))
TypeError: __new__() got an unexpected keyword argument 'allow_new'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __new__() got an unexpected keyword argument 'allow_new'
member = ctx.author
guild = ctx.guild
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
guild.me: discord.PermissionOverwrite(read_messages=True, manage_channels=True, send_messages=True, manage_messages=True, manage_roles=True),
member: discord.PermissionOverwrite(read_messages=True)
}
ticket = await guild.create_text_channel(f"questions-{r.randint(0,99999)}", overwrites=overwrites)