From 7ac6653353e908b6b5d8973d43383f7c89d0e9ed Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 31 Dec 2017 21:26:08 -0500 Subject: [PATCH] WIP del_response setting --- src/run.py | 5 +++++ src/utils/utils.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/run.py b/src/run.py index ed72b9d..0c401dc 100644 --- a/src/run.py +++ b/src/run.py @@ -159,6 +159,11 @@ 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(ctx): +# if ctx.guild.id in u.settings['del_resp']: +# pass + @bot.event async def on_command_completion(ctx): with suppress(err.NotFound): diff --git a/src/utils/utils.py b/src/utils/utils.py index 4c555fe..ebb30d1 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -82,7 +82,7 @@ def dump(obj, filename, *, json=False): jsn.dump(obj, outfile, indent=4, sort_keys=True) -settings = setdefault('misc/settings.pkl', {'del_ctx': [], 'prefixes': {}}) +settings = setdefault('misc/settings.pkl', {'del_ctx': [], 'del_resp': [], 'prefixes': {}}) tasks = setdefault('cogs/tasks.pkl', {'auto_del': [], 'auto_hrt': [], 'auto_rev': [], 'periodic_gpm': []}) temp = setdefault('temp/temp.pkl', {'startup': ()}) secrets = setdefault('secrets.json', {'client_secrets': {'client_id': '', 'client_secret': ''}}, json=True)