!so command for Mods only

Asked Mar 17, 2023·4 replies·Last activity 3 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.

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

4 replies

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 @Hardy Monkey!

While @Dusty Eagle'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.