Add help command

This commit is contained in:
Terry Hearst 2022-09-12 23:25:48 -04:00
parent ca7acfec0a
commit 59a65f778e

9
bot.py
View file

@ -91,6 +91,15 @@ class Bot(commands.Bot):
del self.custom_commands[command_name] del self.custom_commands[command_name]
await ctx.send(f"Deleted command \"{PREFIX}{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(): def main():
load_dotenv() load_dotenv()