My discord bot does replies to certain messages but not the other

Viewed 29

I am making a discord bot that I can send the day and lesson number then it prints out the lesson. I am planning on making it reply with simple if statements. It replies to some of the if statements but not the rest.

import discord
import discord.client
import random

TOKEN = *************************************************

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    print("Logged as {0.user}".format(client))

@client.event
async def on_message(message):

    if message.author == client.user:
        return

    if message.content.lower().startswith("hello"):
        await message.channel.send(f'Hello, {message.author.display_name}!')
        return

    elif message.content.lower().startswith("S1"):
        await message.channel.send(f'Arabic')
        return

client.run(TOKEN)
  1. Am I going the right way about creating the bot?
  2. If not, what and how should I go about creating it?
  3. What has gone wrong?
  4. How do I fix it? Messages Replied and aired
1 Answers
Related