From 5bb47547bd6bda22a09e0fb6d45c346358f37cc0 Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 19 Nov 2017 11:40:08 -0500 Subject: [PATCH] Added lastcommand --- src/main/run.py | 6 ++++++ src/main/utils/utils.py | 1 + 2 files changed, 7 insertions(+) diff --git a/src/main/run.py b/src/main/run.py index cf12975..30dde81 100644 --- a/src/main/run.py +++ b/src/main/run.py @@ -105,6 +105,12 @@ async def on_command_error(ctx, error): await ctx.message.add_reaction('\N{WARNING SIGN}') # u.notify('C O M M A N D E R R O R') +@bot.event +async def on_command_completion(ctx): + + if ctx.command.name != 'lastcommand': + u.last_commands[ctx.author.id] = ctx + # d.opus.load_opus('opus') diff --git a/src/main/utils/utils.py b/src/main/utils/utils.py index 02bb003..e77cd0c 100644 --- a/src/main/utils/utils.py +++ b/src/main/utils/utils.py @@ -71,6 +71,7 @@ temp = setdefault('temp.pkl', {}) RATE_LIMIT = 2.2 color = d.Color(0x1A1A1A) session = aiohttp.ClientSession() +last_commands = {} # async def clear(obj, interval=10 * 60, replace=None):