Command Creation



Could someone help me code this command plz

I wanted to create a command called : !newboss USER
This command would remove every user from regular group and then add USER to regular group.
When done it would post a message in tchat : USER is the new Boss !

I looked through custom script creations but i don’t have the knowledge to code that my self even if i am sure it is quite easy.

It would be greatly appreciated

Thx a lot

1 Like

To be honest, I personally did not understand anything. Can you reformulate your question more clearly?



Sorry, i ll try to explain again :

I need a command called for the example !example
This command would need to be used with a name of a viewer after it like this : !example “viewer name”
The command would remove every viewer in the group : Regular
Then it would add the specified viewer in the command to the Regular group
Finally it would post a sentence in the twitch chat saying its done

I hope i explained better this time :slight_smile:


1 Like

You would have to ensure that you disable the auto-promote system. You would need to write a script that walks the group table and removes all entries with a value of 6. Then you need to use $.setUserByGroupId to promote the single user.


Thx a lot IIlusionaryOne for your answer :slight_smile:

I see what you mean but i just don’t have the knowledge to code something like that, how to write it, etc… :confused:
Could you be kind enough to write the code down it would be greatly appreciated

Many Thx !!


You can see if someone picks up the request. Unfortunately, I typically do not have time to work on additional items and only pick up bugs or feature requests with several votes behind them.



Okay no problem i hope someone will help me out with that piece of code cause i haven’t found any other bot that can do such thing.

The open source part of Phantom Bot is really great for such things :smiley:

Thx for your reply & help IllusionaryOne :wink:


Are you limiting the amount of people in the regulars group to only one person, that being the “boss”?

If so, there’s code that exists that could just drop the entire regular table and add the one user back. But as IO said, you’d have to disable automatic promotion for that to work properly.

I assume you’re using regulars to give the “boss” command access that others won’t be able to use? Otherwise just writing a standalone system would be better (one not tied into the regulars role).


Thx for your answer Usernames :wink:

Yes its exactly what i am looking for :smiley:
The promote system is effectively deactivated
Only the person in that group should win points
If you know how i could code that i would really appreciate it :wink:


Any help would be appreciated from coders out there ! I am sure this would only take a few lines of code to work :slight_smile:


I have a few questions before i would consider before i have a go at this.

  1. what access would the user have that is the boss
  2. does it have to be the regular or can it be a custom system
  3. do you have plans for it to be integrated into stuff that’s already in the bot?

I ask these questions as i don’t see what this is for except just setting 1 user to regular more info would be nice… feel free to ping me on discord @Dakoda#0001 if you wish too if thats easier to talk about this


Hi Dakoda :slight_smile:

Here is the story : I use a “Boss” system on my live, explanation : When someone kills the Boss by doing damage (with donations,bits or other) he becomes the Boss and will be the only one winning points every X minutes as long as he stays the Boss, he can be killed by other users via the same system, etc … At the end of the week the person with the most points wins a game of his choice.

So i need a command to remove everyone in a group/rank and put the name of the person who is the Boss alone in this group/rank so only he wins points.

So to answer your 3 questions :

  1. The access the user will have is as before, no new access or permissions.
  2. it can be a custom system of course.
  3. Eventually, when Streamlabs will allow the possibility of getting the boss name via the Streamlabs API it could become an automatic command launched as soon as a boss is killed :slight_smile:

I tried to add you on discord but it failed to find your tag so here is mine if you want to try : Sir-Aza#9371

Thx a lot for your help i hope you will be able to help me out :wink:


A huge Thanks to Dakoda !!!

He helped me out big time and it works really perfectly !!!

<3 <3 <3


did you make a custom module? i would like something like this but wouldn’t really want it tied to my regulars. but really just give one person access to curtain commands for period of time by using a command in chat instead having to go to the dashboard and do a bunch of moving things.