How do I know where Nightbot command is executed?

If I want a command to run differently on twitch/discord. How do I do this?

The provider variable: https://docs.nightbot.tv/commands/variables/provider

It is also passed in the headers from nightbot through customapi’s

1 Like

Further question, if I want a command doesn’t run on specific providers as if it’s not defined. Is this possible?

You can use the eval variable to determine the output or response of the command.

I have tried eval, eval need to evaluate to a displayable value. It’s not what I want.

No, eval allows you to execute Javascript. If you use an if/else statement and the $(provider) variable together, you can achieve what you’re looking for.

I think you mean this, make your command return a space: " ", this Will make nightbot not respond in chat. In combination with the eval and provider variables you can make silent commands for one or more platforms.

(This message with Just a space was bugged a while ago not sure if this has been fixed by Twitch yet)

1 Like

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