title: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NoEntryPointError: Extension 'cogs.help' has no 'setup' function
body: <p>I am attempting to make a cog for my Discord Bot.</p>
  <p>However, attempting to load the cog prompts me with the error</p>
  <pre class="lang-py prettyprint-override"><code>discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NoEntryPointError: Extension 'cogs.help' has no 'setup' function.
  </code></pre>
  <p>The code for my loader is;</p>
  <pre class="lang-py prettyprint-override"><code>@bot.command()
  async def load(ctx, extension):
      id = str(ctx.author.id)
      if id == '721029142602056328':
          bot.load_extension(f'cogs.{extension}')
          print(f'Specified cog {extension} loaded!')
          author = ctx.message.author
  
          embed = discord.Embed(
              colour = discord.Colour.from_rgb(255, 237, 76)
          )
  
          embed.add_field(name='Cog Loaded', value=f&quot;Specified cog {extension} loaded by {author}.&quot;, inline=False)
  
          await ctx.send(embed=embed)
      else:
          embed = discord.Embed(
              colour = discord.Colour.from_rgb(255, 237, 76)
          )
  
          embed.add_field(name=&quot;You can't do this!&quot;, value=f&quot;You can't load the {extension} cog.&quot;, inline=False)
  
          await ctx.send(embed=embed)
  
  @bot.command()
  async def unload(ctx, extension):
      id = str(ctx.author.id)
      if id == '721029142602056328':
          bot.unload_extension(f'cogs.{extension}')
          print(f'Specified cog {extension} unloaded!')
          author = ctx.message.author
  
          embed = discord.Embed(
              colour = discord.Colour.from_rgb(255, 237, 76)
          )
  
          embed.add_field(name='Cog Unloaded', value=f&quot;Specified cog {extension} unloaded by {author}.&quot;, inline=False)
  
          await ctx.send(embed=embed)
      else:
          embed = discord.Embed(
              colour = discord.Colour.from_rgb(255, 237, 76)
          )
  
          embed.add_field(name=&quot;You can't do this!&quot;, value=f&quot;You can't unload the {extension} cog.&quot;, inline=False)
  
          await ctx.send(embed=embed)
  
  for filename in os.listdir('./cogs'):
      if filename.endswith('.py'):
          bot.load_extension(f'cogs.{filename[:-3]}')
  </code></pre>
  <p>If anyone could solve my error it would be greatly appreciated. It is also of note I can start the bot however I must remove &quot;for file name in os.listdir...&quot;</p>
  <p>Thanks</p>
  <h1>EDIT</h1>
  <p>I have just realized I forgot to include the code to my cog upon making this post.</p>
  <pre class="lang-py prettyprint-override"><code>import discord
  from discord.ext import commands
  
  
  class Help(commands.Cog):
      def __init__(self, bot):
          self.bot = bot
  
  def setup(bot):
      bot.add_cog(Help(bot))
  </code></pre>