Quotes script functions¶
Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.
quotes.add¶
Saves a new quote. It gets the next number. Leave the user out for the person who triggered the action. Fails when the text is empty.
| Value | What to put in |
|---|---|
text |
The quote, like "I never miss a jump." |
user |
Optional. Who said it, like "CoolStreamer". Leave it out for the user of the trigger. |
userId |
Optional. That person's user id. Leave it out for the id of the trigger's user. |
platform |
Optional. The platform, like "twitch". Leave it out for the platform of the trigger. |
game |
Optional. The game, like "Celeste". Leave it out for the game Cuebot last saw you stream. |
Gives back: The new quote, with id, text, user, userId, platform, game and createdAt.
var answer = await Cb.Call("quotes.add", new { text = "I never miss a jump.", user = "CoolStreamer" });
answer = cb.call("quotes.add", text="I never miss a jump.", user="CoolStreamer")
quotes.count¶
Counts your saved quotes.
Gives back: The number of quotes.
var answer = await Cb.Call("quotes.count");
answer = cb.call("quotes.count")
quotes.delete¶
Deletes a quote.
| Value | What to put in |
|---|---|
id |
The quote number, like 12 ("#12" works too). |
Gives back: true when it existed, otherwise false.
var answer = await Cb.Call("quotes.delete", new { id = 12 });
answer = cb.call("quotes.delete", id=12)
quotes.edit¶
Changes a quote. Only what you pass is changed; the rest stays.
| Value | What to put in |
|---|---|
id |
The quote number, like 12 ("#12" works too). |
text |
Optional. The new quote text. |
user |
Optional. The new name of who said it. |
game |
Optional. The new game. |
Gives back: The changed quote with id, text, user, userId, platform, game and createdAt, or null when there is no such quote.
var answer = await Cb.Call("quotes.edit", new { id = 12, game = "Celeste" });
answer = cb.call("quotes.edit", id=12, game="Celeste")
quotes.get¶
Gets one quote by its number.
| Value | What to put in |
|---|---|
id |
The quote number, like 12 ("#12" works too). |
Gives back: An object with id, text, user, userId, platform, game and createdAt. null when there is no such quote.
var answer = await Cb.Call("quotes.get", new { id = 12 });
answer = cb.call("quotes.get", id=12)
quotes.random¶
Picks a random quote. Can pick only among quotes that contain a word, and can fire the Quote shown trigger.
| Value | What to put in |
|---|---|
search |
Optional. Only quotes whose text, user or game contains this, like "jump". A number also matches that quote id. |
show |
Optional. true also runs your Quote shown trigger with the picked quote. Leave it out for false. |
Gives back: The quote with id, text, user, userId, platform, game and createdAt, or null when none match.
var answer = await Cb.Call("quotes.random", new { search = "jump", show = true });
answer = cb.call("quotes.random", search="jump", show=True)
quotes.search¶
Finds quotes whose text, user or game contains a word. Upper or lower case does not matter.
| Value | What to put in |
|---|---|
query |
What to look for, like "jump". Leave it empty for every quote. |
Gives back: A list of quotes, each with id, text, user, userId, platform, game and createdAt.
var answer = await Cb.Call("quotes.search", new { query = "jump" });
answer = cb.call("quotes.search", query="jump")
quotes.show¶
Runs your Quote shown trigger for a quote, so an overlay or action can display it.
| Value | What to put in |
|---|---|
id |
The quote number, like 12 ("#12" works too). |
Gives back: The quote with id, text, user, userId, platform, game and createdAt, or null when there is no such quote.
var answer = await Cb.Call("quotes.show", new { id = 12 });
answer = cb.call("quotes.show", id=12)