From 59a65f778e36dd8933b5cb3db7c6e59a7ac41ce3 Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Mon, 12 Sep 2022 23:25:48 -0400 Subject: [PATCH] Add help command --- bot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bot.py b/bot.py index f27b5bc..306c5c7 100644 --- a/bot.py +++ b/bot.py @@ -91,6 +91,15 @@ class Bot(commands.Bot): del self.custom_commands[command_name] await ctx.send(f"Deleted command \"{PREFIX}{command_name}\"") + @commands.command() + async def help(self, ctx: commands.Context): + message = "Available commands:" + for command in self.commands: + message += f" {PREFIX}{command}" + for command in self.custom_commands.keys(): + message += f" {PREFIX}{command}" + await ctx.send(message) + def main(): load_dotenv()