Browse Source

Fix wrong permission assert for channel deletion

pull/96/head
Kyriog 7 years ago
committed by GitHub
parent
commit
fff5f8c6d3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      disco/types/channel.py

2
disco/types/channel.py

@ -387,7 +387,7 @@ class Channel(SlottedModel, Permissible):
self.delete_message(msg)
def delete(self, **kwargs):
assert (self.is_dm or self.guild.can(self.client.state.me, Permissions.MANAGE_GUILD)), 'Invalid Permissions'
assert (self.is_dm or self.guild.can(self.client.state.me, Permissions.MANAGE_CHANNELS)), 'Invalid Permissions'
self.client.api.channels_delete(self.id, **kwargs)
def close(self):

Loading…
Cancel
Save