Browse Source

[commands] clean up remove_cog documentation

remove_cog always returns None, even if the cog is found.
pull/620/head
khazhyk 8 years ago
committed by GitHub
parent
commit
bca72e64d6
  1. 5
      discord/ext/commands/bot.py

5
discord/ext/commands/bot.py

@ -611,8 +611,7 @@ class BotBase(GroupMixin):
All registered commands and event listeners that the All registered commands and event listeners that the
cog has registered will be removed as well. cog has registered will be removed as well.
If no cog is found then ``None`` is returned, otherwise If no cog is found then this method has no effect.
the cog instance that is being removed is returned.
If the cog defines a special member function named ``__unload`` If the cog defines a special member function named ``__unload``
then it is called when removal has completed. This function then it is called when removal has completed. This function
@ -626,7 +625,7 @@ class BotBase(GroupMixin):
cog = self.cogs.pop(name, None) cog = self.cogs.pop(name, None)
if cog is None: if cog is None:
return cog return
members = inspect.getmembers(cog) members = inspect.getmembers(cog)
for name, member in members: for name, member in members:

Loading…
Cancel
Save