title: Python discord bot, command not found
body: <p>Why am I getting this error: <code>Ignoring exception in command None: discord.ext.commands.errors.CommandNotFound: Command &quot;Test&quot; is not found</code></p>
  <p>I saw other posts about this but the problem was them either not having their token or the <code>bot.run(TOKEN)</code> at the bottom</p>
  <p>*EDIT Here's the updated code, still get the same error</p>
  <pre><code>import discord
  from dotenv import load_dotenv
  from discord.ext import commands
  
  load_dotenv()
  TOKEN = os.getenv('DISCORD_TOKEN')
  GUILD = os.getenv('DISCORD_GUILD')
  
  bot = commands.Bot(command_prefix='$', case_insensitive=True)
  
  @bot.event
  async def on_ready():
      for guild in bot.guilds:
          if guild.name == GUILD:
              break
  
      print(
          f'{bot.user} is connected to the following guild:\n'
          f'{guild.name}(id: {guild.id})'
      )
  
  @bot.command()
  async def on_message(ctx, arg):
      if ctx.author == bot.user:
          return
          
      if ctx.content.startswith('hello'):
          await ctx.channel.send(arg)
  
  bot.run(TOKEN)
  
  
  bot.run(TOKEN)
  </code></pre>