title: Custom Help Command removing specific commands like owner or admin commands
body: <p>So i made a discord bot following few tutorials and i made a custom help command so i dont want the help command to display some commands such as load or unload cogs command few owner or admin commands. But i a not exactly able to figure out how to do it i checked a few similar posts but in that the created a cog with owner commands but my commands is spread across a few cogs. I am a bit new to discord.py so please guide me. Thank You!! in advance</p>
  <p>So this is my custom help command code:-</p>
  <pre><code>import random
  from typing import Optional
  from discord import Embed
  from discord.utils import get
  from discord.ext.menus import MenuPages, ListPageSource
  from discord.ext.commands import Cog
  from discord.ext.commands import command
  
  colors = [0xFFE4E1, 0x00FF7F, 0xD8BFD8, 0xDC143C, 0xFF4500, 0xDEB887, 0xADFF2F, 0x800000, 0x4682B4, 0x006400, 0x808080, 0xA0522D, 0xF08080, 0xC71585, 0xFFB6C1, 0x00CED1]
  
  def syntax(command):
      cmd_and_aliases = &quot;|&quot;.join([str(command), *command.aliases])
      params = []
  
      for key, value in command.params.items():
          if key not in (&quot;self&quot;, &quot;ctx&quot;):
              params.append(f&quot;[{key}]&quot; if &quot;NoneType&quot; in str(value) else f&quot;&lt;{key}&gt;&quot;)
  
      params = &quot; &quot;.join(params)
  
      return f&quot;`{cmd_and_aliases} {params}`&quot;
  
  
  class HelpMenu(ListPageSource):
      def __init__(self, ctx, data):
          self.ctx = ctx
  
          super().__init__(data, per_page=5)
  
      async def write_page(self, menu, fields=[]):
          offset = (menu.current_page*self.per_page) + 1
          len_data = len(self.entries)
  
          embed = Embed(title=&quot;Help&quot;,
                        description=&quot;Welcome to the help dialog!&quot;,
                        colour= random.choice(colors))
          embed.set_thumbnail(url=self.ctx.guild.me.avatar_url)
          embed.set_footer(text=f&quot;{offset:,} - {min(len_data, offset+self.per_page-1):,} of {len_data:,} commands.&quot;)
  
          for name, value in fields:
              embed.add_field(name=name, value=value, inline=False)
  
          return embed
  
      async def format_page(self, menu, entries):
          fields = []
  
          for entry in entries:
              fields.append((entry.brief or &quot;No description&quot;, f&quot;-{syntax(entry)}&quot;))
  
          return await self.write_page(menu, fields)
  
  
  class Help(Cog):
      def __init__(self, bot):
          self.bot = bot
          self.bot.remove_command(&quot;help&quot;)
  
      async def cmd_help(self, ctx, command):
          embed = Embed(title=f&quot;Help with `{command}`&quot;,
                        description=f&quot;-{syntax(command)}&quot;,
                        colour=random.choice(colors))
          embed.add_field(name=&quot;Command description&quot;, value=command.help)
          await ctx.send(embed=embed)
  
  
      @command(name=&quot;help&quot;, brief=&quot;Help&quot;, help=&quot;Gives the info of the commands.&quot;)
      async def show_help(self, ctx, cmd: Optional[str]):
          &quot;&quot;&quot;Shows this message.&quot;&quot;&quot;
          if cmd is None:
              x = list(self.bot.commands)
              menu = MenuPages(source=HelpMenu(ctx, x))
              await menu.start(ctx)
  
          else:
              if (command := get(self.bot.commands, name=cmd)):
                  await self.cmd_help(ctx, command)
  
              else:
                  await ctx.send(&quot;That command does not exist.&quot;)
  
      @Cog.listener()
      async def on_ready(self):
          print(&quot;help ready&quot;)
  
  
  def setup(bot):
      bot.add_cog(Help(bot))
  </code></pre>