0

I have made a Discord bot using Python. My bot previously worked fine. However, I am now getting an error whenever I try to run the bot. (I haven't changed any of the code whatsoever). What I have noticed is that the bot appears as an online user extremely briefly and then I get the following message:

Traceback (most recent call last):
  File "C:\Users\user\[BOT LOCATION]", line 416, in <module>
    client.run('[TOKEN]')
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 640, in run
    return future.result()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 621, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 585, in start
    await self.connect(reconnect=reconnect)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 499, in connect
    await self._connect()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 463, in _connect
    await self.ws.poll_event()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 471, in poll_event
    await self.received_message(msg)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 425, in received_message
    func(data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 750, in parse_guild_create
    guild = self._get_create_guild(data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 725, in _get_create_guild
    guild._from_data(data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 297, in _from_data
    self._sync(guild)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 324, in _sync
    self._add_channel(TextChannel(guild=self, data=c, state=self._state))
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\channel.py", line 107, in __init__
    self._update(guild, data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\channel.py", line 131, in _update
    self._fill_overwrites(data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\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 something I have only encountered today. The bot worked perfectly two days ago. I can also connect to Discord as an actual user, so I don't think it's to do with my Internet connection. Is this due to a change in the way Discord handles bots?

  • Please check this. It's the same problem. https://stackoverflow.com/a/63080729/11437085 – Raz Crimson Jul 24 '20 at 20:41
  • Here's the solution: https://stackoverflow.com/a/63029386/11608114 – RyanPython Jul 25 '20 at 12:29
  • Does this answer your question? [Discord.py Glitch or random error: TypeError: \_\_new\_\_() got an unexpected keyword argument 'deny\_new'](https://stackoverflow.com/questions/63027848/discord-py-glitch-or-random-error-typeerror-new-got-an-unexpected-keywor) – Gino Mempin Mar 04 '21 at 12:42

0 Answers0