Browse Source
Fix wrong permission assert for channel deletion
pull/96/head
Kyriog
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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): |
|
|
|