Is there some kind of function that stops two scripts from triggering on the same message?

Person: HELLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO www.google.com
Bot: Too much caps.
Bot: Don't link without permission.

The text above is just an example. But the problem is the same, any ideas?