Phrase Recognition

what’s the format for Nightbot to recognize a phrase instead of the first word? I would like to make nightbot respond to a multiple-word command!


It’s not possible for a command name to have spaces but you can work around that using this:

!addcom -cd=5 FIRST_WORD $(eval decodeURIComponent(`$(querystring)`).toLowerCase()==`REST_OF_THE_PHRASE`.toLowerCase()?`COMMAND_RESPONSE`:` `)

Replace FIRST_WORD with the first word of the phrase, REST_OF_THE_PHRASE with the rest of the phrase, and COMMAND_RESPONSE with your command response.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.