Discord bot won't respond to my commands

Hello there! I’m new to creating and developing Discord bots. and I created a simple script:

import discord
import os

client = discord.Client(intents=discord.Intents.default())

async def on_ready():
    print('We have logged in as {0.user}'.format(client))

async def on_message(message):
    if message.author == client.user:

    if message.content.startswith('$hello'):
     await message.channel.send('Hello!')


And when I run it in console, it doesn’t give me any errors, and it says that it’s running, and Discord says that my bot is online.

Thank you for reading.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.