[commands] Fix bug where Context.command would not update.
This commit is contained in:
parent
9d9a20c128
commit
37dfe38af5
@ -638,7 +638,6 @@ class Bot(GroupMixin, discord.Client):
|
|||||||
if invoker in self.commands:
|
if invoker in self.commands:
|
||||||
command = self.commands[invoker]
|
command = self.commands[invoker]
|
||||||
self.dispatch('command', command, ctx)
|
self.dispatch('command', command, ctx)
|
||||||
ctx.command = command
|
|
||||||
try:
|
try:
|
||||||
yield from command.invoke(ctx)
|
yield from command.invoke(ctx)
|
||||||
except CommandError as e:
|
except CommandError as e:
|
||||||
|
@ -365,6 +365,7 @@ class Command:
|
|||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def invoke(self, ctx):
|
def invoke(self, ctx):
|
||||||
|
ctx.command = self
|
||||||
self._verify_checks(ctx)
|
self._verify_checks(ctx)
|
||||||
yield from self._parse_arguments(ctx)
|
yield from self._parse_arguments(ctx)
|
||||||
|
|
||||||
@ -588,6 +589,7 @@ class Group(GroupMixin, Command):
|
|||||||
def invoke(self, ctx):
|
def invoke(self, ctx):
|
||||||
early_invoke = not self.invoke_without_command
|
early_invoke = not self.invoke_without_command
|
||||||
if early_invoke:
|
if early_invoke:
|
||||||
|
ctx.command = self
|
||||||
self._verify_checks(ctx)
|
self._verify_checks(ctx)
|
||||||
yield from self._parse_arguments(ctx)
|
yield from self._parse_arguments(ctx)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user