Fix an issue with clearing permission rules (#3015)

Fixes #3014
This commit is contained in:
Michael H 2019-09-26 11:41:11 -04:00 committed by GitHub
parent 1ee5238ad7
commit af97175839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1 @@
Fixes an issue with clearing rules in permissions

View File

@ -573,6 +573,14 @@ class Group(GroupMixin, Command, CogGroupMixin, commands.Group):
class CogMixin(CogGroupMixin, CogCommandMixin): class CogMixin(CogGroupMixin, CogCommandMixin):
"""Mixin class for a cog, intended for use with discord.py's cog class""" """Mixin class for a cog, intended for use with discord.py's cog class"""
@property
def all_commands(self) -> Dict[str, Command]:
"""
This does not have identical behavior to
Group.all_commands but should return what you expect
"""
return {cmd.name: cmd for cmd in self.__cog_commands__}
@property @property
def help(self): def help(self):
doc = self.__doc__ doc = self.__doc__