Last night my Discord bots randomly stopped working and when I tried to restart it I got an error saying that bot.run wasn't working
The bot to run
File "main.py", line 217, in
bot.run()
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_event
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 324, in _sync
self._add_channel(TextChannel(guild=self, data=c, state=self._state))
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 'deny_new'
Duplicate of #5109.
Update your discord.py
Seeing the same thing on the latest version of discord.py (1.3.4)
...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 definitely fixed in 1.3.4, please double check that you installed it to the correct environment or python version,.
My project is a hot mess raw dogging global, with discord.py installed globally. It's gross but it's def happening in 1.3.4 (python 3.8, latest updates)
Once again, the lines in the traceback do not match the code in v1.3.4. You're not using the proper version.
And yet v1.3.4 is installed. Maybe your installer is broken? This happens even if you installl discord.py fresh.
Most helpful comment
Once again, the lines in the traceback do not match the code in v1.3.4. You're not using the proper version.