Random bot participation

Asked Oct 22, 2020·3 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.

I wanna make a command that allows the bot to give a random response without a trigger
for example:
UserA: shut up nerd
UserB: dont talk like that bro
UserA: who are you? My dad?
Bot: stfu pls

It doesn't matter if its every 10 or 100 comments it just has to have that surprise element or give a response like every 2 to 100 chat lines randomly

3 replies

Hey @Elder Crab!

The application you're looking for is not possible with Nightbot.
However, what you can do to have is react to a sentence in particular is:

!addcom first_word_of_the_sentence $(eval `$(query)`.toLowerCase().includes(`rest_or_part_of_the_sentence_in_lowercase`)?`Nightbot_response_if_match`:` `)

Actually if you were to use a timer you could set up a random response every so often if that’s what you really want.

Yeah, you could, but I don't think it's a good idea to tell your chat to shut up every now and then, haha!