!so command for Mods only

I need the command CODE, to add the command !so (shoutout) Streamer. But only accessible for the Mods and Streamer.

You can do !commands add !so Go check out this fellow streamer $(touser) on twitch. tv/$(touser) . Last time seeing playing $(twitch $(touser) “{{game}}”) -ul=moderator

Hey @broofeglistheripper!

While @supersa1yan0’s solution is correct, allow me to give you a properly formatted answer with a better use of the $(twitch) variable:

!addcom !so -ul=mod $(twitch $(touser) "Go check out {{displayName}} at {{url}} They played {{game}}.")

The relevant bit of “code” here is -ul=mod, that’s the parameter telling Nightbot to make this command only available to moderators and above.

It’s best practice to put -ul= or other parameter before the command’s code, it makes things clearer.
I recommend reading the documentation for !commands and $(twitch).

You can also edit your current !so command to be only available to moderators and above:

!editcom !so -ul=mod

I have tried to change the change the command on my friends stream, using the command as I am a mod. But doing so it wont let me shoutout any channels anymore on my friends channel chat.

Then that means you’re either not a moderator (anymore) of their Twitch chat, or the commands’ userlevel is set higher than moderator.

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