Error loading discord bot on startup. hosted through repl.it

不问归期 提交于 2020-08-09 19:31:06

问题


A couple days ago my discord bot suddenly went offline, i host my bot through repl.it and i cant get it to work as it gives a dirty error.

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'

this is in the console and i dont know what it means. we didnt change any code, nothing it just went offline and stop working.


回答1:


Just update the discord.py module. Discord switched the api domain from discordapp.com to discord.com. That is the reason for the code crashing.




回答2:


You can just go to packages and uninstall the current discord.py module. Then re-add it. There is no feature to directly update the discord.py module. SO u have to uninstall and re-install. [worked for me]



来源:https://stackoverflow.com/questions/63080672/error-loading-discord-bot-on-startup-hosted-through-repl-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!