aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorAnInternetTroll <lucafulger@gmail.com>2020-06-25 11:37:24 +0000
committerAnInternetTroll <lucafulger@gmail.com>2020-06-25 11:37:24 +0000
commit7178630d6417ab7ac7e32209750ff4f1171dbbc8 (patch)
treeee838cb39429ad521d2e4319b040a566cbbe0363 /cogs
parentfbe08ee9d65d87b8bf27bac4d483067d764c17dd (diff)
parenta987a1405bad5c4e813c9b847d06ef62e1a13eae (diff)
downloadsteve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar.gz
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar.bz2
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar.lz
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar.xz
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.tar.zst
steve-bot-7178630d6417ab7ac7e32209750ff4f1171dbbc8.zip
Merge branch 'master' of https://github.com/AnInternetTroll/mcbeDiscordBot
Diffstat (limited to 'cogs')
-rwxr-xr-xcogs/admin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cogs/admin.py b/cogs/admin.py
index e03ce7d..1623f49 100755
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -51,7 +51,6 @@ class Admin(commands.Cog):
await ctx.send(f"Removed command {command}")
-
@commands.check(is_mod)
@commands.command(name='reload', hidden=True, usage='<extension>')
async def _reload(self, ctx, ext):
@@ -205,6 +204,8 @@ class Admin(commands.Cog):
@commands.command()
async def setvar(self, ctx, key, *, value):
with open('config.json', 'w') as f:
+ if value[0] == '[' and value[len(value)-1] == ']':
+ value = list(map(int, value[1:-1].split(',')))
self.bot.config[str(ctx.message.guild.id)][key] = value
json.dump(self.bot.config, f, indent=4)