you use the wrong quotation marks: ‘’ and “” instead of ' and " respectively,
you forget to put the first $(touser) inside quotation marks, therefore it’s considered an undefined variable and not a string,
$(touser) is case sensitive, while $(channel) is in lower case, therefore '$(touser) == '$(channel)' will always be false if you made any of your username’s letter upper case.
With all that in mind, here’s the fix:
$(eval '$(touser)'.toLowerCase() === '$(channel)' ? 'No, not allowed' : 'Check out $(touser). They were last playing $(twitch $(touser) "{{game}}")')
Hi @Emily , thanks for the helpful and quick response. I tried incorporating the fixes you suggested and when I tried to do the whole custom message nightbot would output an unexpected identifier error. Not sure what variable would be unexpected in this case.
$(eval '$(touser)'.toLowerCase() === '$(channel)' ? 'No, not allowed, illegal' : 'twitchRaid twitchRaid twitchRaid $(touser) was last seen playing [$(twitch $(touser) "{{game}}")] Let's send some Kibbles love from us here at the Dog House to twitch.tv/$(touser)')
That’s because of your shoutout sentence: Let's closes the string sooner than you want because of the apostrophe, therefore it confuses the code and breaks, you can fix that by adding a \ (backslash) before the apostrophe, so Let\'s or by putting the whole sentence between ` (backticks) instead of single quote marks.