diff options
| author | khazhyk <[email protected]> | 2017-07-03 19:02:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-07-03 19:02:00 -0700 |
| commit | bca72e64d6272ea471d04d6f2d4ed5a8c53854be (patch) | |
| tree | 7f4c978daeb744e5e474b15a0fcc1c8ee7fcf387 | |
| parent | Fix wrong order in migrating docs. (diff) | |
| download | discord.py-bca72e64d6272ea471d04d6f2d4ed5a8c53854be.tar.xz discord.py-bca72e64d6272ea471d04d6f2d4ed5a8c53854be.zip | |
[commands] clean up remove_cog documentation
remove_cog always returns None, even if the cog is found.
| -rw-r--r-- | discord/ext/commands/bot.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 7157319d..3a488a41 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -611,8 +611,7 @@ class BotBase(GroupMixin): All registered commands and event listeners that the cog has registered will be removed as well. - If no cog is found then ``None`` is returned, otherwise - the cog instance that is being removed is returned. + If no cog is found then this method has no effect. If the cog defines a special member function named ``__unload`` then it is called when removal has completed. This function @@ -626,7 +625,7 @@ class BotBase(GroupMixin): cog = self.cogs.pop(name, None) if cog is None: - return cog + return members = inspect.getmembers(cog) for name, member in members: |