diff --git a/bot.py b/bot.py index 5725437..a0c266f 100644 --- a/bot.py +++ b/bot.py @@ -93,23 +93,13 @@ async def on_message(message): @bot.event async def on_command_completion(command, ctx): # There's no reason to continue waiting for this to complete, so lets immediately launch this in a new future - bot.loop.create_task(process_command(command, ctx)) - now = datetime.datetime.now() - - fmt = "In server '{0.message.server}' at {1}\n" \ - "Full message: `{0.message.content}`\n" \ - "Command detected was: {2}\n" \ - "ctx command would be: {0.command.qualified_name}\n\n".format( - ctx, str(now), command.qualified_name) - with open('command_log', 'a') as l: - print(fmt, file=l) + bot.loop.create_task(process_command(ctx)) -async def process_command(command, ctx): - # This try catch is only here while this is first being implemented - # It will be removed once I ensure this is working correctly +async def process_command(ctx): author = ctx.message.author server = ctx.message.server + command = ctx.command r_filter = {'command': command.qualified_name} command_usage = await config.get_content('command_usage', r_filter)