Excluding greeting streamer

Asked Apr 2, 2021·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.

How do I make the bot stop responding when the streamer says 'hello'?

7 replies

Remove any commands that starts with "hello" so Nightbot won't respond to it.

Can you react when you speak only to the viewer, not the streamer?

Hey @Eager Orangutan!

You can prevent the bot from answering the streamer messages this way:

$(eval `$(user)`.toLowerCase()==`$(channel)`?` `:`Hello!`)

Can I apply it like this?

!addcom hello -cd=5 $(twitch $(user) "{{displayName}}") 님 $(eval a=["welcome~", "hi~", "hello~"];a[Math.floor(Math.random() * a.length)]) $(eval $(user)==$(channel)? :Hello,welcome,hi)

You don't need to use $(twitch $(user) "{{displayName}}"), $(user) gives you the same result.

Right now, if I said "hello" in your chat, the response would be:

Emily 님 welcome~/hi~/hello~ Hello,welcome,hi

You have to combine the bit of code I gave earlier with your array if you want to have a randomly picked answer:

$(eval a=[`welcome~`, `hi~`, `hello~`]; `$(user)`.toLowerCase()==`$(channel)`?` `:`$(user) 님 ${a[Math.floor(Math.random()*a.length)]}`)

master, dobby is free! ty 😃 so much!

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

Ask on Discord