Skip to content

Reference Script Functions Streamelements

Kristopher Barrantes edited this page Nov 5, 2026 · 2 revisions

StreamElements script functions

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.

A Run Python code step in the action editor

streamelements.addUserPoints

Gives a viewer StreamElements loyalty points. Use a minus number to take points away. Needs your StreamElements token; fails with an error otherwise.

Value In Python What to put in
user user The viewer's name, like "CoolViewer". Needed.
amount amount How many points to add, like 100. Use a minus number, like -50, to take points away.

Gives back: The viewer's new points total.

C#

var answer = await Cb.Call("streamelements.addUserPoints", new { user = "CoolViewer", amount = 100 });

Python

answer = cb.streamelements_add_user_points(user="CoolViewer", amount=100)

streamelements.getPointsLeaderboard

Gets the viewers with the most StreamElements loyalty points. Needs your StreamElements token; fails with an error otherwise.

Value In Python What to put in
count count Optional. How many people to get. Default 5.

Gives back: A list of the viewers with the most points. Each has user and points.

C#

var answer = await Cb.Call("streamelements.getPointsLeaderboard", new { count = 10 });

Python

answer = cb.streamelements_get_points_leaderboard(count=10)

streamelements.getTipLeaderboard

Gets the viewers who tipped you the most on StreamElements. Needs your StreamElements token; fails with an error otherwise.

Value In Python What to put in
count count Optional. How many people to get. Default 5.

Gives back: A list of the top tippers. Each has user and total (how much they tipped).

C#

var answer = await Cb.Call("streamelements.getTipLeaderboard", new { count = 3 });

Python

answer = cb.streamelements_get_tip_leaderboard(count=3)

streamelements.getTips

Gets your latest StreamElements tips. Needs your StreamElements token; fails with an error otherwise.

Value In Python What to put in
count count Optional. How many tips to get. Default 5.

Gives back: A list of tips. Each has user, amount, currency, formattedAmount (like "$5.00"), message and createdAt.

C#

var answer = await Cb.Call("streamelements.getTips", new { count = 5 });

Python

answer = cb.streamelements_get_tips(count=5)

streamelements.getUserPoints

Looks up how many StreamElements loyalty points a viewer has. Needs your StreamElements token on the Donations page; fails with an error otherwise.

Value In Python What to put in
user user The viewer's name, like "CoolViewer". A leading @ is fine. Needed.

Gives back: user, points (now), pointsAllTime and rank.

C#

var answer = await Cb.Call("streamelements.getUserPoints", new { user = "CoolViewer" });

Python

answer = cb.streamelements_get_user_points(user="CoolViewer")

streamelements.isConnected

Checks whether Cuebot is connected to StreamElements right now.

Gives back: true while connected, otherwise false.

C#

var answer = await Cb.Call("streamelements.isConnected");

Python

answer = cb.streamelements_is_connected()

streamelements.sendTestEvent

Fakes a StreamElements event inside Cuebot, so you can test your triggers. Nothing is sent to StreamElements and it works without a connection.

Value In Python What to put in
kind kind Optional. Which event: "tip", "merch" or "redemption". Default "tip".

Gives back: true when the test event was sent, false when the kind is unknown.

C#

var answer = await Cb.Call("streamelements.sendTestEvent", new { kind = "tip" });

Python

answer = cb.streamelements_send_test_event(kind="tip")

Clone this wiki locally