diff options
author | Mango0x45 <thomasvoss@live.com> | 2020-08-11 12:53:11 +0000 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2020-08-11 12:53:11 +0000 |
commit | 54b73701438d7d8d3821aaec0d0fb6728b5df8f2 (patch) | |
tree | c9e707fb811e8008c155da11b840745022d60e21 /cogs | |
parent | 85ce3053a69c5e62fe6775563b8a7fddba9c071e (diff) | |
download | steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar.gz steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar.bz2 steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar.lz steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar.xz steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.tar.zst steve-bot-54b73701438d7d8d3821aaec0d0fb6728b5df8f2.zip |
Print all config vars at once
Diffstat (limited to 'cogs')
-rwxr-xr-x | cogs/admin.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index b315a94..a9f6dca 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -278,9 +278,13 @@ class Admin(commands.Cog): @commands.command() @commands.check(is_mod) - async def printvar(self, ctx, key): - """Print a config variable, use for testing""" - await ctx.send(self.bot.config[str(ctx.message.guild.id)][key]) + async def printvar(self, ctx, key = None): + """Print config variables, use for testing""" + if key == None: + for key, value in self.bot.config[str(ctx.message.guild.id)].items(): + ctx.send(f'Key: {key} | Value: {value}') + else: + await ctx.send(self.bot.config[str(ctx.message.guild.id)][key]) @commands.command() @commands.check(is_mod) @@ -313,7 +317,7 @@ class Admin(commands.Cog): for player in self.bot.runs_blacklist["players"]: message += f'{player}, ' await ctx.send(f'{message[:-2]}```') - + @commands.command() @commands.check(is_botmaster) async def give_role(self, ctx, role_id): |