Repository navigation
Reference Script Functions Groups
Also on the Cuebot Docs site.
Functions for C# (Cb.Call) and Python (a cb method each, or cb.call). See Script functions for how to use them.
Puts a viewer in a group, like "Giveaway". The group is made when it does not exist yet. Leave the user out for the person who triggered the action.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
platform |
platform |
Optional. The platform, like "twitch". Leave it out for the platform of the trigger. |
user |
user |
Optional. The user name, like "CoolViewer42" (a leading @ is fine). Leave it out for the user of the trigger. |
userId |
user_id |
Optional. The user's id on that platform. Leave it out for the id of the trigger's user. |
Gives back: true when added, false when they were already in it.
C#
var answer = await Cb.Call("groups.add", new { group = "Giveaway" });Python
answer = cb.groups_add(group="Giveaway")Takes every viewer out of a group. The group itself stays.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
Gives back: How many viewers were removed, or -1 when there is no such group.
C#
var answer = await Cb.Call("groups.clear", new { group = "Giveaway" });Python
answer = cb.groups_clear(group="Giveaway")Checks whether a viewer is in a group. Matches by user id when both have one, otherwise by name.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
platform |
platform |
Optional. The platform, like "twitch". Leave it out for the platform of the trigger. |
user |
user |
Optional. The user name, like "CoolViewer42" (a leading @ is fine). Leave it out for the user of the trigger. |
userId |
user_id |
Optional. The user's id on that platform. Leave it out for the id of the trigger's user. |
Gives back: true when they are in the group, otherwise false.
C#
var answer = await Cb.Call("groups.contains", new { group = "Giveaway", user = "CoolViewer42" });Python
answer = cb.groups_contains(group="Giveaway", user="CoolViewer42")Makes a new, empty group.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
Gives back: true when it was made, false when a group with that name already exists.
C#
var answer = await Cb.Call("groups.create", new { group = "Giveaway" });Python
answer = cb.groups_create(group="Giveaway")Deletes a group and its member list.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
Gives back: true when it was deleted, false when there was no such group.
C#
var answer = await Cb.Call("groups.delete", new { group = "Giveaway" });Python
answer = cb.groups_delete(group="Giveaway")Checks whether a group with this name exists.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
Gives back: true when it exists, otherwise false.
C#
var answer = await Cb.Call("groups.exists", new { group = "Giveaway" });Python
answer = cb.groups_exists(group="Giveaway")Lists the names of all your groups.
Gives back: A list of group names, like ["Giveaway", "Regulars"].
C#
var answer = await Cb.Call("groups.list");Python
answer = cb.groups_list()Takes a viewer out of a group. Leave the user out for the person who triggered the action.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
platform |
platform |
Optional. The platform, like "twitch". Leave it out for the platform of the trigger. |
user |
user |
Optional. The user name, like "CoolViewer42" (a leading @ is fine). Leave it out for the user of the trigger. |
userId |
user_id |
Optional. The user's id on that platform. Leave it out for the id of the trigger's user. |
Gives back: true when removed, false when they were not in it.
C#
var answer = await Cb.Call("groups.remove", new { group = "Giveaway", user = "CoolViewer42" });Python
answer = cb.groups_remove(group="Giveaway", user="CoolViewer42")Lists the viewers in a group.
| Value | In Python | What to put in |
|---|---|---|
group |
group |
The group name, like "Giveaway". |
Gives back: A list of members, each with platform, userId and userName. Empty when the group does not exist.
C#
var answer = await Cb.Call("groups.users", new { group = "Giveaway" });Python
answer = cb.groups_users(group="Giveaway")Cuebot by Tech Daddy Digital · MIT license · Privacy
Cuebot Docs (the same pages, nicer to read)
- Home
- Start here
-
Guides
- Chat commands
- The mod portal
- Overlays and alerts
- Writing your own overlay widgets
- Text-to-speech
- Music and now playing
- Points, store and giveaways
- Subathons and goals
- Stream apps and devices
- VTuber apps
- Stream Deck
- The phone app
- Donations and integrations
- Discord bot
- The setup assistant and AI tools
- The assistant on your own computer
- Moving from Streamer.bot
- Cuebot's servers
- Writing code (C# and Python)
- Python in detail
- Using your own code editor
- Controlling Cuebot from other programs
- Backups and your data
- Linux
- Command-line options
- Troubleshooting
- What's experimental
- Reference
