diff options
| author | Rapptz <[email protected]> | 2019-02-23 04:10:10 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-02-23 04:10:10 -0500 |
| commit | caf3d17d4aa3ce45435bb96ea6d99317bfef8618 (patch) | |
| tree | d8bff0494efd7ba51d011ab4b7a9d30009eeae6d /discord/ext/commands/context.py | |
| parent | [commands] Fix up wording on HelpFormatter.get_ending_note (diff) | |
| download | discord.py-caf3d17d4aa3ce45435bb96ea6d99317bfef8618.tar.xz discord.py-caf3d17d4aa3ce45435bb96ea6d99317bfef8618.zip | |
Rework entire cog system and partially document it and extensions.
Diffstat (limited to 'discord/ext/commands/context.py')
| -rw-r--r-- | discord/ext/commands/context.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index ea193696..bef94f04 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -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): |