aboutsummaryrefslogtreecommitdiff
path: root/cogs/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'cogs/utils.py')
-rwxr-xr-xcogs/utils.py10
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))