You cannot perform logic in the matchtext field of an event like that, you can either match all text * and handle conditions inside the event or use a regex for the text match. There are no arrays, everything is stored as a string. You can use the token identifiers $addtok, $gettok, etc. to work with lists.
If your goal is to catch when one of multiple words are used you can use a regex match:
on $*:text:/word1|word2|word3/iS:#:{
If you're going to have a lot of these conditions it may be best to use a hash table and $hfind