I am trying to make a simple on_message event for the bot but somehow the bot is ready and online, but no event is working...
Here is an example of my code:
import discord
token = "--My token--"
client = discord.Client()
@client.event
async def on_ready():
print(f"Connected to APPLICATION {client.user}")
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith("$test"):
await message.channel.send("test")
client.run(token)