Discord Bot崩溃:typeerror __new __()得到了意外的关键字参数'deny_new'

时间:2020-08-18 23:13:43

标签: discord.py

我只是为了娱乐而制作了一个机器人,并在我的Test Server上对其进行了测试,然后一切正常。但是,当我尝试将其放入另一台服务器时,它崩溃了。

我在cmd中得到这个:

Traceback (most recent call last):
  File "botardo.py", line 19, in <module>
    client.run('token')
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 598, in run
    return future.result()
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 579, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 543, in start
    await self.connect(reconnect=reconnect)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 457, in connect
    await self._connect()
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 421, in _connect
    await self.ws.poll_event()
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 469, in poll_event
    await self.received_message(msg)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 423, in received_message
    func(data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 663, in parse_guild_create
    guild = self._get_create_guild(data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 641, in _get_create_guild
    return self._add_guild_from_data(data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 255, in _add_guild_from_data
    guild = Guild(data=guild, state=self)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 280, in __init__
    self._from_data(data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 391, in _from_data
    self._sync(guild)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 420, in _sync
    self._add_channel(VoiceChannel(guild=self, data=c, state=self._state))
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 504, in __init__
    self._update(guild, data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 535, in _update
    self._fill_overwrites(data)
  File "C:\Users\kakob\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 271, in _fill_overwrites
    self._overwrites.append(_Overwrites(id=overridden_id, **overridden))
TypeError: __new__() got an unexpected keyword argument 'deny_new'

我还看到了有关此错误的其他文章,但令我最感兴趣的是它可以在我的Test服务器上运行,而不能在其他服务器上运行。有什么想法吗?

谢谢!

1 个答案:

答案 0 :(得分:0)

重新安装discord.py应该可以解决问题