Title says it all. I tried looking for the id:
if "845314564555931660" in message.content:
I tried looking for the id in an integer:
if 845314564555931660 in message.content:
The integer recognizes it but gets an error because it's looking for an int in a str.
I tried converting the id into a ping:
if <@845314564555931660> in message.content:
I tried using the ping alone:
if "@Sugarcane" in message.content:
None can detect the message.
You can use the
discord.Message.role_mentionsordiscord.Message.raw_role_mentionsattributes..role_mentionsreturns a list ofdiscord.Roleobjects that were mentioned in the message.raw_role_mentionsreturns a list of role IDs as integers.