[Permissions] Fix Requires.ready_event.set() on subcommands (#2868)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-07-14 13:05:07 +10:00 committed by Michael H
parent 1d2980f8fa
commit d5c412e3df

View File

@ -457,7 +457,7 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin): # pylint: d
for subcommand in set(command.walk_commands()):
self.dispatch("command_add", subcommand)
if permissions_not_loaded:
command.requires.ready_event.set()
subcommand.requires.ready_event.set()
def remove_command(self, name: str) -> None:
command = super().remove_command(name)