I was following a tutorial for discord.py and the person who was teaching was getting pretty complicated.
He told use to create a main\_cogs.py file and i did it.

This is the exact code as him:

```py
import config 
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='-')
class Test(commands.Cog):
    def __init__(self,bot):
        self.bot= bot

    @commands.command
    async def ping(self ,ctx):
        await ctx.send("Pong")

bot.run(config.token)

```

BTW config is a file with the token and all that stuff.

When i run it and type -ping(in chat) i get this in the console and nothing in chat:

```sh
Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "ping" is not found

```

for him it just works.

[The video](https://www.youtube.com/watch?v=g1xESivzCPE&list=PLESMQx4LeD3NmTZ8D1qwQwwSp67kznl-K&index=7)

Thank You for the help!