Nightbot response to chats phrases

Asked Nov 23, 2020·7 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

A streamer I mod for wants a command set up to where when somebody says a specific name, nightbot responds with a phrase.
for example:

Viewer: :"blah blah blah Charlie."
Nightbot: "you must donate such and such amount of money before I answer that question."

7 replies

Hey @Snug Mouse!

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 ; (semi-colon)...
Same key, I must have been pressing Shift.

Hi,

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 @member"

@Sable Goat Heya,

!addcom -cd=5 hello Hello @$(user)

Regards

Maple Goose said:
-cd=5

Tnx,

what the meaning of "-cd=5" ?

@Sable Goat 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.

Regards

Didn't find your answer? The community is on Discord.

Ask on Discord