For example, @GuiedGui pings me, but "@GuiedGui" does not. Unless it does. But @GuiedGui! does not.
If I'm not mistaken, right now mentions are limited to one word, meaning seperated by spaces. Instead, I propse the following algorithm:
Say we have a message "Hi, @A B C, D!" Since there is an @, we will check for mentions. For each @, take the string starting after the @ and before the next character that cannot be in a username or the end of the string, whichever is closer. Check if that string (at first "A B C" in our case) is a valid username. If it is, then convert it to a mention. Otherwise, chop off any characters after and including a non-alphanumeric character. Rinse and repeat. If no valid usernames were found, then there's no mentions.
I scraped this up, so it might not make sense, but it should be an improvement on the current model. For example, "@GuiedGui!" will now ping me and "@Gemini Guardian" will now ping Mimi instead of Gemini.