[CustomCom] Set Requires.ready_event before invoking CC (#2876)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-07-15 20:13:06 +10:00 committed by GitHub
parent 3b0567d261
commit 3de9d15410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -470,6 +470,7 @@ class CustomCommands(commands.Cog):
# wrap the command here so it won't register with the bot # wrap the command here so it won't register with the bot
fake_cc = commands.command(name=ctx.invoked_with)(self.cc_callback) fake_cc = commands.command(name=ctx.invoked_with)(self.cc_callback)
fake_cc.params = self.prepare_args(raw_response) fake_cc.params = self.prepare_args(raw_response)
fake_cc.requires.ready_event.set()
ctx.command = fake_cc ctx.command = fake_cc
await self.bot.invoke(ctx) await self.bot.invoke(ctx)