If I do something like if message.content.startswith('hello'):
it works fine.
However, I can't find a way to make it work for pings. I tried bot ID and name. My code with bot ID:
@client.event
async def on_message(message):
await client.process_commands(message)
if message.content.startswith('<@741352621826375781>'):
embed = discord.Embed(
colour = discord.Colour.red())
embed.add_field(name='Hello', value='''My prefix is `.`, type `.help` for help.''', inline=False)
await message.channel.send(embed=embed)
Can somebody help?