function executing from a message

can I make a function run by saying smth in the chat?
Continue to help post