The regex for direct mention will fail if another user is mention in the message.
I.e. regex <@([WU].+)>.+ will match "<@Uuser1> message <@Uuser2> more message" to the last ">" in the string.
Suggest to change to <@([WU].+?)>.+
Encountered this when I wanted the bot parse commands to interact with other users.
The regex for direct mention will fail if another user is mention in the message. I.e. regex <@([WU].+)>.+ will match "<@Uuser1> message <@Uuser2> more message" to the last ">" in the string. Suggest to change to <@([WU].+?)>.+
Encountered this when I wanted the bot parse commands to interact with other users.