I'd like my bot to respond when a certain user is mentioned. I've only found snippets of the answer on Google and I can't quite put them together. I've noticed that if I call a string in place of user ID it works, but if I call the string with the user ID in the same message it returns nothing.
Any insight is appreciated, work is below (subbing the desired users id into <@user_id> of course):
@client.event
async def on_message(message):
if message.author == client.user:
return
#Making sure it doesn't respond to itself
if "@here" in message.content:
return
if "@everyone" in message.content:
return
#Making sure it doesn't respond to tags including everyone
if '<@user_id>' in message.content:
clock = get_time()
clock = json.dumps(clock, indent=4)
await message.channel.send("The time in Athens is currently: ")
await message.channel.send(clock[-11: -6])
client.run(os.environ['TOKEN'])