aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com>2020-08-11 13:37:05 +0000
committerMango0x45 <thomasvoss@live.com>2020-08-11 13:37:05 +0000
commita3ad9e8df85a815220549b0fb86c30db2769c6a0 (patch)
treecc557ce8b60f514f2ad9f54ff52ff1fd51b5083c /cogs
parent3b61579042a8159320222f0bff338c92071d8513 (diff)
downloadsteve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar.gz
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar.bz2
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar.lz
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar.xz
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.tar.zst
steve-bot-a3ad9e8df85a815220549b0fb86c30db2769c6a0.zip
added delvar()
Diffstat (limited to 'cogs')
-rwxr-xr-xcogs/admin.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cogs/admin.py b/cogs/admin.py
index 04a698e..014d4cb 100755
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -287,6 +287,14 @@ class Admin(commands.Cog):
else:
await ctx.send(self.bot.config[str(ctx.message.guild.id)][key])
+ @commands.command(aliases=['rmvar'])
+ @commands.check(is_botmaster)
+ async def delvar(self, ctx, key):
+ """Deletes a config variable, be careful"""
+ with open('config.json', 'w') as f:
+ await ctx.send(f"Removed {self.bot.config[str(ctx.message.guild.id)].pop(key)}")
+ json.dump(self.bot.config, f, indent=4)
+
@commands.command()
@commands.check(is_mod)
async def blacklistvideo(self, ctx, uri):