Hi or hello Twitch command setting question!

I have the following Hi and Hey command setup, which pretty much does the job well.

!commands add hi Hey $(user) hope you’re having a good time!
!commands add hey -a=hi $(querystring)

My question is there a way where nightbot triggers the command when you tag the streamers alone? Like “hi @streamer

This command will only produce a response if the user’s message mentions the channel name.

!addcom hi $(eval d=decodeURIComponent;RegExp(`(\\b|@)${d("$(querystring $(channel))").replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}\\b`,"i").test(d("$(querystring)"))?`Hey ${d("$(querystring $(user))")} hope you're having a good time!`:" ")
1 Like

Thank you @am_1, exactly what I was looking for :slight_smile:

Thank you, for the great effort. Is it possible to include when user type “hi” and “hello” in chat along with same logic as previous and ignores any viewer handle other than the streamer.

For an example, When you type hi or hello, it greets the same as previous and ignores any other viewer handles like hi @viewer. Can this be included alongside with “hi @streamer” and also “hi” alone in the chat.

This command will only produce a response if the user’s message is “hi” or if it starts with “hi” and also mentions the channel name.

!addcom hi $(eval d=decodeURIComponent;RegExp(`(\\b|@)${d("$(querystring $(channel))").replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}\\b|^\\s*$`,"i").test(d("$(querystring)"))?`Hey ${d("$(querystring $(user))")} hope you're having a good time!`:" ")
1 Like

Thanks again @am_1, hope someone who’s looking for similar solution might find this helpful :slight_smile:

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