title: Pycord Error: discord.errors.ExtensionFailed: Extension 'cogs.cmds' raised an error: AttributeError: 'Bot' object has no attribute 'add_command'
body: <p>I am trying to load a cog (located in the <code>cogs</code> directory) but everytime I try to load it I get the following error message:</p>
  <pre><code>discord.errors.ExtensionFailed: Extension 'cogs.cmds' raised an error: AttributeError: 'Bot' object has no attribute 'add_command'
  </code></pre>
  <p>I'm doing exacly how the tutorial shows, but it still doesn't work. Here is my code:</p>
  <pre class="lang-py prettyprint-override"><code># main.py
  
  import discord, os, dotenv
  
  # setup
  bot = discord.Bot(
      intents = discord.Intents.default(),
      prefix = &quot;zrun &quot;
  )
  
  @bot.event
  async def on_ready():
      print(f'Connected as {bot.user}')
  
  # load cmds
  bot.load_extension('cogs.cmds')
  
  # get token and run bot
  dotenv.load_dotenv()
  bot.run(os.getenv('TOKEN'))
  </code></pre>
  <p>The cog file:</p>
  <pre class="lang-py prettyprint-override"><code># cogs/cmds.py
  
  import discord
  from discord.ext import commands
  
  class Cmds(commands.Cog):
      def __init__(self, bot):
          self.bot = bot
  
      @commands.command()
      async def echo(self, ctx, msg:str):
          &quot;&quot;&quot;Sends the specified text in the chat&quot;&quot;&quot;
  
          await ctx.send(msg)
  
  def setup(bot):
      bot.add_cog(Cmds(bot))
  </code></pre>
  <p>Yes, I've searched StackOveflow, but no cog-related answers solved my problem.</p>