A streamer I mod for wants a command set up to where when somebody says a specific name, nightbot responds with a phrase.
Viewer: :“blah blah blah Charlie.”
Nightbot: “you must donate such and such amount of money before I answer that question.”
If you want Nightbot to detect a specific word that could be anywhere in a sentence, this isn’t possible.
If you want Nightbot to detect a specific sentence, you can do so like this:
!addcom FIRST_WORD_OF_THE_SENTENCE $(eval `$(query)`.includes(`REST_OF_THE_SENTENCE`)?`RESPONSE`:` `;)
Thank you. This worked perfectly.
The only issue i had was you entered an extra : at the end but it was an easy fix.
Oh, my bad, it was meant to be a
Same key, I must have been pressing
Can i add some how to response message the name of user that i response to ?
I mean if “someone” write in chat “Hello” the Nightbot will response “Hello @someone”
!addcom -cd=5 hello Hello @$(user)
what the meaning of “-cd=5” ?
@constafun That’s cooldown, by default adding commands via YouTube Live chat cooldown will be of 30 seconds. 5 seconds is minimum cool down you can set.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.