Kruiser8 / Kruiz-Control

Kruiz Control enables a pseudo code approach to manage and automatically handle Twitch Channel Points, Twitch Chat, OBS or SLOBS, and StreamElements or Streamlabs alerts.
Other
231 stars 32 forks source link

Multiple users for command #61

Closed Epyxx closed 1 year ago

Epyxx commented 1 year ago

Hi there,

i want a command to be used by multiple users. is there a way to put multiple usernames instead of only one? currently i have copied that action for every user but that fills the triggers.txt very much. maybe something like this:

OnCommand u [user1,user2,user3,user4] 0 !command

And then i want the same thing in the opposite way, like a command for everyone except a few users, like so:

OnCommand e 0 !command
If {user} in [user1,user2,user3,user4]
Chat Send "You have no permission for this command"
Else
Chat Send "Cool Command"

Is something possible with Kruiz?

Thanks!

Kruiser8 commented 1 year ago

Hey Epyxx,

You could use a list?

OnInit
List Add CommandUserList user1
List Add CommandUserList user2
List Add CommandUserList user3
List Add CommandUserList user4

OnCommand e 0 !command
List Contains CommandUserList {user}
If 2 {contains} == true
Chat Send "You have no permission for this command"
Exit
Chat Send "Cool Command"
Kruiser8 commented 1 year ago

Support for OnCommand u user1,user2,user3,user4 0 !command added in the upcoming release.