diff options
Diffstat (limited to 'cogs/utils.py')
-rwxr-xr-x | cogs/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index 27fd708..5492c14 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -312,5 +312,15 @@ class Utils(commands.Cog): async def roll(self, ctx, pool): await ctx.send(f"You rolled a {randint(0, int(pool))}") + @commands.command(aliases=['commands', 'allcommands']) + async def listcommands(self, ctx): + with open('custom_commands.json', 'r') as f: + commands = json.load(f) + output = '```List of custom commands:\n' + for key in commands: + output += f'{key}, ' + output += '```' + await ctx.send(output) + def setup(bot): bot.add_cog(Utils(bot)) |