Repository navigation
Reference Script Functions Obs
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.
Lists every OBS connection you set up in Cuebot.
Gives back: A list with one entry per connection: name, state (Disconnected, Connecting, Connected or Error) and scene (its current scene).
C#
var answer = await Cb.Call("obs.connections");Python
answer = cb.obs_connections()Asks OBS which scene is live right now. Fails with an error when OBS is not connected.
| Value | In Python | What to put in |
|---|---|---|
connection |
connection |
Optional. The name of the OBS connection to use. Leave it out for your main OBS. |
Gives back: The name of the live (program) scene, like "Gameplay".
C#
var answer = await Cb.Call("obs.getCurrentScene");Python
answer = cb.obs_get_current_scene()Sends any obs-websocket command to OBS and gives back OBS's answer. Good for things Cuebot has no ready-made step for. Fails with an error when OBS is not connected.
| Value | In Python | What to put in |
|---|---|---|
requestType |
request_type |
The obs-websocket command name, like "GetVersion" or "SetCurrentProgramScene". Needed. |
requestData |
request_data |
Optional. The settings for the command, like {"sceneName": "Gameplay"}. Leave it out when the command needs none. |
connection |
connection |
Optional. The name of the OBS connection to use. Leave it out for your main OBS. |
Gives back: OBS's answer data for that command (its responseData).
C#
var answer = await Cb.Call("obs.request", new { requestType = "SetCurrentProgramScene", requestData = new { sceneName = "Gameplay" } });Python
answer = cb.obs_request(request_type="SetCurrentProgramScene", request_data={"sceneName": "Gameplay"})Sends several obs-websocket commands to OBS in one go. One failed command does not stop the rest, unless you ask it to. Fails with an error when OBS is not connected.
| Value | In Python | What to put in |
|---|---|---|
requests |
requests |
A list of commands. Each one has a requestType and, if needed, requestData, like {"requestType": "GetVersion"}. Needed. |
haltOnFailure |
halt_on_failure |
Optional. true stops at the first command that fails. Default false. |
connection |
connection |
Optional. The name of the OBS connection to use. Leave it out for your main OBS. |
Gives back: A list with one result per command: its requestType, requestStatus (did it work) and responseData.
C#
var answer = await Cb.Call("obs.requestBatch", new { requests = new object?[] { new { requestType = "GetVersion" }, new { requestType = "SetCurrentProgramScene", requestData = new { sceneName = "Gameplay" } } } });Python
answer = cb.obs_request_batch(requests=[{"requestType": "GetVersion"}, {"requestType": "SetCurrentProgramScene", "requestData": {"sceneName": "Gameplay"}}])Switches OBS to another scene. Fails with an error when OBS is not connected.
| Value | In Python | What to put in |
|---|---|---|
sceneName |
scene_name |
The scene name exactly as OBS shows it, like "Gameplay". |
connection |
connection |
Optional. The name of the OBS connection to use. Leave it out for your main OBS. |
Gives back: Nothing.
C#
var answer = await Cb.Call("obs.setScene", new { sceneName = "Gameplay" });Python
answer = cb.obs_set_scene(scene_name="Gameplay")Cuebot by Tech Daddy Digital · MIT license · Privacy
Cuebot Docs (the same pages, nicer to read)
- Home
- Start here
-
Guides
- Chat commands
- 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
