aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormango0x45 <dogelikestopkekmemes@gmail.com>2020-06-09 21:56:01 +0000
committermango0x45 <dogelikestopkekmemes@gmail.com>2020-06-09 21:56:01 +0000
commitc13e9c3846b8653deadb5fe6bb8ae8701c52e5fe (patch)
tree2ce8e0a47c6379825c6992e31c76279e4747ef01
parentd5a2ee762404f5bebc292d311a1eee706de465bf (diff)
downloadsteve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar.gz
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar.bz2
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar.lz
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar.xz
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.tar.zst
steve-bot-c13e9c3846b8653deadb5fe6bb8ae8701c52e5fe.zip
Added listcommands()
-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))