Disable command when offline

Can I set a custom command to be disabled when I’m offline on Twitch? My !song command would be it, here’s the current messsage: $(user), $(lastfm erosbencee)

Hey @erosbencee!

Yes you can, please use the search bar before opening a new topic:

Hey @Emily !
Thanks for your reply. I saw that topic, but as I’m new to Nightbot it didn’t make sense to me and I couldn’t comment because it’s closed.
Where do I have to paste that text? Here’s the current messsage for my !song command: $(user), $(lastfm erosbencee)
And why does it say “message when streaming” when the message is supposed to be sent when offline?
Please help me. Thank you in advance!

You just have to replace the MESSAGE_WHEN_STREAMING field with the response you want the bot to send when you’re live, and when you’re offline it’ll respond saying the command is disabled, like this:

$(eval '$(twitch $(channel) "{{status}}")' === 'live' ? '$(user), $(lastfm erosbencee)' : 'This command is currently disabled.')

If you don’t want any response when you’re offline, you simply replace the message that says the command is disabled with a space:

$(eval '$(twitch $(channel) "{{status}}")' === 'live' ? '$(user), $(lastfm erosbencee)' : ' ')

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