Rework entire cog system and partially document it and extensions.

This commit is contained in:
Rapptz
2019-02-23 04:10:10 -05:00
parent 3f06f247c0
commit caf3d17d4a
14 changed files with 776 additions and 184 deletions

View File

@ -118,8 +118,8 @@ class Context(discord.abc.Messageable):
raise TypeError('Missing command to invoke.') from None
arguments = []
if command.instance is not None:
arguments.append(command.instance)
if command.cog is not None:
arguments.append(command.cog)
arguments.append(self)
arguments.extend(args[1:])
@ -195,7 +195,7 @@ class Context(discord.abc.Messageable):
if self.command is None:
return None
return self.command.instance
return self.command.cog
@discord.utils.cached_property
def guild(self):