title: discord.ext.commands.errors.ExtensionNotFound: Extension 'cogs.random' could not be loaded
body: <p>I'm trying to run my discord bot with commands extension so i can store all my commands separately under <code>commands</code> folder, however every time i want to run the bot, i get bunch of errors in terminal, here is everything:</p>
  
  <p><strong>Terminal:</strong> <code>./bot.py</code></p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/xinto/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 621, in load_extension
      lib = importlib.import_module(name)
    File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 953, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'cogs.random'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "handlerbot.py", line 36, in &lt;module&gt;
      client.load_extension(f'cogs.{filename[:-3]}')
    File "/home/xinto/.local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 623, in load_extension
      raise errors.ExtensionNotFound(name, e) from e
  discord.ext.commands.errors.ExtensionNotFound: Extension 'cogs.random' could not be loaded.
  </code></pre>
  
  <p><strong>bot.py:</strong></p>
  
  <pre><code>#!/usr/bin/python3.6
  
  import discord
  from dotenv import load_dotenv
  import random
  from discord.ext import commands
  import os
  
  load_dotenv()
  TOKEN = os.getenv('TOKEN')
  
  client = commands.Bot(command_prefix = '!')
  
  #this script types "Connected!" in terminal if nothing has gone wrong    
  @client.event
  async def on_ready():
      print('Connected!')        
  
  #this script makes sure that bot doesn't reply to itself
  @client.event
  async def on_message(message):
      if message.author == client.user:
          return
  
  @client.command()
  async def load(ctx, extension):
      client.load_extension(f'cogs.{extension}')
  
  @client.command()
  async def unload(ctx, extension):
      client.unload_extension(f'cogs.{extension}')
  
  for filename in os.listdir('./commands'):
      if filename.endswith('.py'):
          client.load_extension(f'cogs.{filename[:-3]}')
  
  client.run(TOKEN)
  </code></pre>
  
  <p><strong>random.py:</strong></p>
  
  <pre><code>import discord
  import os
  from discord.ext import commands
  
  class random(commands.Cog):
  
      def __init__(self, client):
          self.client = client
  
      @commands.command()
      async def random(self, ctx):
          for filename in os.listdir(./images):
          list = '1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.jpg', '10.jpg', '11.jpg', '12.jpg'
          await ctx.send('take this', file=discord.File(random.choice(list)))
  
  def setup(client):
      client.add_cog(random(client))
  </code></pre>
  
  <p>I can't blame random.py as it does the same with other my commands, I've checked the code and couldn't find any reasons why it shouldn't work. any help would be highly appreciated, Thanks!</p>