diff options
| author | Rapptz <[email protected]> | 2019-03-13 23:43:29 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-13 23:43:29 -0400 |
| commit | c4a21cc1d4eecaca7b1c638842647d1ed1b6a49d (patch) | |
| tree | db2b7939781b2632b72159e448b068b32be1368b /discord/ext/commands/cog.py | |
| parent | Support path-like objects in Attachment.save. (diff) | |
| download | discord.py-c4a21cc1d4eecaca7b1c638842647d1ed1b6a49d.tar.xz discord.py-c4a21cc1d4eecaca7b1c638842647d1ed1b6a49d.zip | |
[commands] Add Cog.qualified_name to query the specified cog name.
Diffstat (limited to 'discord/ext/commands/cog.py')
| -rw-r--r-- | discord/ext/commands/cog.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 5892ffa1..afcfd9c5 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -176,6 +176,11 @@ class Cog(metaclass=CogMeta): """ return [c for c in self.__cog_commands__ if c.parent is None] + @property + def qualified_name(self): + """:class:`str`: Returns the cog's specified name, not the class name.""" + return self.__cog_name__ + def walk_commands(self): """An iterator that recursively walks through this cog's commands and subcommands.""" from .core import GroupMixin |