diff options
-rw-r--r-- | cogs/help.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cogs/help.py b/cogs/help.py index dafe6c5..7fb1b9f 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -1,6 +1,7 @@ from discord.ext import commands import discord import asyncio +import json class Help(commands.Cog): def __init__(self, bot): @@ -28,6 +29,21 @@ class Help(commands.Cog): await ctx.send(embed=embed) + @commands.command(aliases=['customcommands', 'ccmds']) + async def listcommands(self, ctx): + """List all custom commands""" + embed = discord.Embed( + title = "Help", + colour = discord.Colour.gold() + ) + with open('custom_commands.json', 'r') as f: + commands = json.load(f) + ccmds = ", ".join([*commands]) + # await ctx.send(f"```List of custom commands: \n{ccmds}```") + # output += f'{ccmds}```' + embed.add_field(name="Custom Commands", value=f"{ccmds}", inline=False) + await ctx.send(embed=embed) + def setup(bot): bot.add_cog(Help(bot)) |