From 778b54f50f81151cbd1bd2e62f5c6d69c4ca0cf0 Mon Sep 17 00:00:00 2001 From: NatrixAeria Date: Mon, 28 Sep 2020 01:37:55 +0200 Subject: Update help message --- bot.py | 6 +++++- command_utils.py | 4 ++-- config.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index d860397..a7e042a 100644 --- a/bot.py +++ b/bot.py @@ -10,7 +10,11 @@ class Client(CommandClient): @Command.names('help', 'hepl', 'h', '?') @Command.description('display this help message') async def help(self, ctx): - await ctx.answer(config.HELP_TEXT) + command_doc = '\n'.join( + f' * {config.COMMAND_PREFIX.strip()} {c.names[0]:15} - {c.description}' + for c in self.get_commands()) + await ctx.answer(f'''``` +{config.HELP_TEXT}\nThese are all available commands:\n{command_doc}```''') @Command.names('init', 'create', 'inti', 'craete', 'cretae', 'c', 'i', '+') @Command.description('create a new lobby') diff --git a/command_utils.py b/command_utils.py index 2dc84c8..b679975 100644 --- a/command_utils.py +++ b/command_utils.py @@ -60,10 +60,10 @@ class Command: return meta @classmethod - def description(cls, *names): + def description(cls, description): def meta(f): f.command = True - f.names = names + f.description = description return f return meta diff --git a/config.py b/config.py index 85d009d..9ac127c 100644 --- a/config.py +++ b/config.py @@ -5,5 +5,5 @@ COMMAND_PREFIX = '!<3' HELP_TEXT = f'''{NAME.title()} - your partner for getting shuffled. {NAME.title()} is a discord bot to get to know your people. -This software is open-source !" +This software is open-source ! ''' -- cgit v1.2.3-54-g00ecf