Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __new__() got an unexpected keyword argument 'allow_new' TextChannel.clone #5126

Closed
3 tasks done
Showdown76py opened this issue Jul 12, 2020 · 2 comments
Closed
3 tasks done
Labels
duplicate This is a duplicate of another issue or PR.

Comments

@Showdown76py
Copy link

Showdown76py commented Jul 12, 2020

Summary

TextChannel.nuke stopped working recently, I don't know if it's an Discord API Update.

Reproduction Steps

I did a nuke command, which should work perfectly: "await ctx.channel.clone(reason="Nuke")" (before it was working perfectly) and now there's an error: TypeError: new() got an unexpected keyword argument 'allow_new'

Expected Results

It should clone the channel, same permissions, same name, cooldown, description, category, etc

Actual Results

It doesn't work and raise TypeError: new() got an unexpected keyword argument 'allow_new'

Traceback (most recent call last):
File "", line 6, in nuke
File "/usr/local/lib/python3.6/site-packages/discord/channel.py", line 242, in clone
}, name=name, reason=reason)
File "/usr/local/lib/python3.6/site-packages/discord/abc.py", line 650, in _clone_impl
obj = cls(state=self._state, guild=self.guild, data=data)
File "/usr/local/lib/python3.6/site-packages/discord/channel.py", line 107, in init
self._update(guild, data)
File "/usr/local/lib/python3.6/site-packages/discord/channel.py", line 131, in _update
self._fill_overwrites(data)
File "/usr/local/lib/python3.6/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'

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

@Rapptz
Copy link
Owner

Rapptz commented Jul 12, 2020

Update the library. This is a duplicate of #5109.

@Rapptz Rapptz closed this as completed Jul 12, 2020
@Rapptz Rapptz added the duplicate This is a duplicate of another issue or PR. label Jul 12, 2020
@nihaals
Copy link
Contributor

nihaals commented Jul 12, 2020

By TextChannel.nuke do you mean TextChannel.clone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This is a duplicate of another issue or PR.
Projects
None yet
Development

No branches or pull requests

3 participants