Command on/off option

Work for a streamer who will regularly use commands but some won’t apply for certain streams and others do. Would it be possible to add some way to turn commands on/off individually so we don’t have to delete them and chat doesn’t have to sort through a bunch that don’t apply to certain streams?

Otherwise love the bot. Great stuff!

Hey @fortn00b15!

There’s no real way to enable/disable specific commands, sorry, however, you can set the userlevel to owner and then people in the chat won’t have access to the command anymore:

!editcom !commandName -ul=owner

And to reverse it:

!editcom !commandName -ul=everyone

Okay so alternative. Create “users” on & off and set it that way like you would changing it to “owner”.

You can litterally program anything nowadays. I have a hard time believing you couldn’t program something as simple as an on/off switch. Appreciate the quick response though!

I mean, yeah, you can definitely set up a command to do it for you, but drop the attitude, you could have asked nicely, instead you chose to sound pretentious, if you know that much about programming do it yourself next time.


!addcom !turn -ul=mod -a=!editcom $(2) \-ul=$(eval if(`$(1)`==`on`){`everyone`} if(`$(1)`==`off`){`owner`})

Syntax:
!turn on !commandName“enable” !commandName
!turn off !commandName“disable” !commandName

I don’t have an attitude I’m just making a point that it’s possible. There is a command to Disable timers. Surely something like that could be implemented for Commands as well.

Yes, of course it’s possible, but the developer has other things to do, Nightbot is a side-project worked on during free time.
It doesn’t make much sense to disable commands once they’re added, that’s why it’s not an option, I gave you a work-around, if you’re not happy with that I don’t know what to tell you.
Of course, users will still see the command, but if they look at the userlevel, they’ll see that they can’t use it, they can even sort the list by userlevel so they know at a quick glance which one they can use, but that won’t prevent people from trying to trigger the “disabled” commands, even if you really could disable a command, users would still remember that the command exists and would try to trigger it, so the results are the same.

1 Like

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