几天前,我的不和谐机器人突然脱机,我通过repl.it托管了我的机器人,但由于出现了肮脏的错误,我无法使其运行。
Traceback (most recent call last):
File "main.py", line 584, in <module>
bot.run("NTg0NjkyODA1NTcwNjU4MzEz.XPOnmw.VpE_ILHaDdQ6k--OIBRovc1h80o")
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 640, in run
return future.result()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 621, in runner
await self.start(*args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 585, in start
await self.connect(reconnect=reconnect)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 499, in connect
await self._connect()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 463, in _connect
await self.ws.poll_event()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/gateway.py", line 471, in poll_even
t
await self.received_message(msg)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/gateway.py", line 425, in received_
message
func(data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/state.py", line 750, in parse_guild
_create
guild = self._get_create_guild(data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/state.py", line 725, in _get_create_guild
guild._from_data(data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/guild.py", line 297, in _from_data
self._sync(guild)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/guild.py", line 328, in _sync
self._add_channel(CategoryChannel(guild=self, data=c, state=self._state))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/channel.py", line 726, in __init__
self._update(guild, data)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/channel.py", line 737, 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 'deny_new'
这是在控制台中,我不知道这是什么意思。我们没有更改任何代码,没有任何东西使它脱机并停止工作。
答案 0 :(得分:2)
只需更新discord.py模块。 Discord将api域从discordapp.com切换到discord.com。这就是代码崩溃的原因。
答案 1 :(得分:0)
您可以直接转到软件包并卸载当前的discord.py模块。然后重新添加。没有直接更新discord.py模块的功能。因此,您必须卸载并重新安装。 [为我工作]