Пример #1
0
 async def show_help(self, ctx, cmd: Optional[str]):
     """displays info on a command"""
     if cmd is None:
         # if no bot is provided, display help for all bots
         await ctx.send(
             "No bots supplied. Documentation will be provided for all bots."
         )
         embeds = Data.get_help_embeds(self.bot)
         for key in embeds:
             await ctx.send(embed=embeds[key])
     elif cmd not in Data.get_bots():
         # if the bot doesn't exist, tell the user
         await ctx.send(f"bot '{cmd}' not found!")
     else:
         # send out the embed for the proper bot
         await ctx.send(embed=Data.get_help_embeds(self.bot)[cmd])
     return