import config from command_utils import Command, CommandClient class Client(CommandClient): async def on_ready(self): print(f'the bot {config.NAME} is logged in as "{self.user}"') @Command.help_command @Command.names('help', 'hepl', 'h', '?') @Command.description('display this help message') async def help(self, ctx): 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') async def init(self, ctx): await ctx.answer(f'NIY') if __name__ == '__main__': from os import getenv token = getenv(config.TOKEN_ENV_VAR) if token is None: print('error: no token was given') exit(1) bot = Client() bot.run(token)