From 641cdb71505419273c3f26f1571fd1cb0588d776 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Fri, 8 Jun 2018 12:39:29 -0800 Subject: [PATCH] Added help info --- src/__main__.py | 1 + src/exts/utils.py | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/__main__.py b/src/__main__.py index 64054cf..9213601 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -61,6 +61,7 @@ class Geeksbot(commands.Bot): self.default_prefix = 'g~' self.voice_chans = {} self.spam_list = {} + self.owner_id = 351794468870946827 self.gcs_service = build('customsearch', 'v1', developerKey=self.bot_secrets['google_search_key']) self.tpe = futures.ThreadPoolExecutor() self.geo_api = '2d4e419c2be04c8abe91cb5dd1548c72' diff --git a/src/exts/utils.py b/src/exts/utils.py index 5f50d21..58a0e3c 100644 --- a/src/exts/utils.py +++ b/src/exts/utils.py @@ -702,12 +702,25 @@ class Utils: @commands.command(name='help', aliases=['h']) @commands.cooldown(1, 5, commands.BucketType.user) async def custom_help(self, ctx, command: str=None): - pag = utils.Paginator(self.bot, embed=True, max_line_length=44) + pag = utils.Paginator(self.bot, embed=True, max_line_length=50) + prefixes = await self.bot.get_custom_prefix() + if isinstance(prefixes, list): + prefixes = ', '.join(prefixes) + owner = await self.bot.get_user_info(self.bot.owner_id) pag.set_embed_meta(title='Geeksbot Help', - description=f'{self.bot.description}', + description=f'{self.bot.description}\n' + f'For more information about a command please run\n' + f'{prefixes.split(",")[0]}help [group] ', thumbnail=f'{ctx.guild.me.avatar_url}') if command is None: - pag.add('\uFFF6My new help\nTest message\n\uFFF7\n\uFFF8') + pag.add(f"Welcome to Geeksbot's help command.\n" + f"Below you will find some basic information about me.\n\n" + f"Version: {self.bot.__version__}\n\n" + f"Owner: Dusty.P\n" + f" Username: {owner.name}#{owner.discriminator}\n" + f" ID: {owner.id}\n\n" + f"Prefixes available for this guild:\n" + f" {prefixes}\n\uFFF7\n\uFFF8") for cog in sorted(self.bot.cogs): for command in self.bot.get_cog_commands(cog): if not command.hidden: