Bot raises a TypeError exception when editing a channel.
Traceback (most recent call last):
File "/home/jan/.local/lib/python3.8/site-packages/discord/ext/tasks/__init__.py", line 73, in _loop
await self.coro(*args, **kwargs)
File "/home/jan/My-Reddit-Bot/cogs/discord_tools.py", line 215, in shitposting
await self.bot.get_channel(channel).edit(name=name)
File "/home/jan/.local/lib/python3.8/site-packages/discord/channel.py", line 683, in edit
await self._edit(options, reason=reason)
File "/home/jan/.local/lib/python3.8/site-packages/discord/abc.py", line 285, in _edit
self._update(self.guild, data)
File "/home/jan/.local/lib/python3.8/site-packages/discord/channel.py", line 584, in _update
self._fill_overwrites(data)
File "/home/jan/.local/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 'allow_new'
Reproduction Steps
Load the channel, attempt to edit the name.
CHANNEL_ID = XXX
async def update_channel_name(self, ctx, name: str):
"Update the channel name"
await self.bot.get_channel(CHANNEL_ID).edit(name=name)
return await ctx.send(f"I updated the channel name to {name} for you")
Expected Results
The channel name gets updated and the method finishes executing.
Actual Results
The channel name gets updated and an exception is raised which halts further execution of the method.
Checklist
[x] I have searched the open issues for duplicates.
[x] I have shown the entire traceback, if possible.
[x] I have removed my token from display, if visible.
System Information
- Python v3.8.0-final
- discord.py v1.3.3-final
- aiohttp v3.6.2
- websockets v8.1
- system info: Linux 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020
Summary
Bot raises a TypeError exception when editing a channel.
Reproduction Steps
Load the channel, attempt to edit the name.
Expected Results
The channel name gets updated and the method finishes executing.
Actual Results
The channel name gets updated and an exception is raised which halts further execution of the method.
Checklist
System Information