0

I am facing a problem with my Python bot for Discord. If I type, for example, !Hello, it isn't working.

I have to type !hello.

Here is the Code:

@client.event
async def on_message(message):
if message.content.startswith("!hello"):
    `print(message.author.name)`
    embed = discord.Embed(color=0xFFCF20)
    embed.add_field(name="text", value="text", inline=False)
    embed.add_field(name="text:", value="text", inline=False)
    await message.author.send(embed=embed)`
Captain Jack Sparrow
  • 971
  • 1
  • 11
  • 28
Durlax GB
  • 53
  • 1
  • 9

1 Answers1

2
if message.content.lower().startswith("!hello"):
ipaleka
  • 3,745
  • 2
  • 13
  • 33