Action Queues

C# Methods for Core > Action Queues

PauseActionQueue

public void PauseActionQueue(string name)

PauseAllActionQueues

public void PauseAllActionQueues()

ResumeActionQueue

public void ResumeActionQueue(string name, bool clear = false)

ResumeAllActionQueues

public void ResumeAllActionQueues(bool clear = false)

ActionExists

Check if an action exist by name
Returns a boolean indicating whether the action exists.

public bool ActionExists(string actionName)

DisableAction

Disables an action, by name

public void DisableAction(string actionName)

DisableActionById

Disables an action, by ID

0.2.4
public void DisableActionById(string actionId)

EnableAction

Enables an action, by name

public void EnableAction(string actionName)

EnableActionById

Enables an action, by ID

0.2.4
public void EnableActionById(string actionId)

GetActions

Returns a list of action data for all available actions

0.2.4
public List<ActionData> GetActions()

RunAction

Run an action, by name

Returns a boolean indicating whether the operation was successful.

public bool RunAction(string actionName, bool runImmediately = true)

RunActionById

Run an action, by id

Returns a boolean indicating whether the operation was successful.

public bool RunActionById(string actionId, bool runImmediately = true)

SetArgument

Set an argument to be used in subsequent sub-actions

public void SetArgument(string variableName, object value)

TryGetArg

Load an argument and parse it into a C# variable type

0.2.3
public bool TryGetArg<T>(string argName, out T& value)
0.2.3
public bool TryGetArg(string argName, out Object& value)

ExecuteMethod

public bool ExecuteMethod(string executeCode, string methodName)

CommandAddToAllUserCooldowns

public void CommandAddToAllUserCooldowns(string id, int seconds)

CommandAddToGlobalCooldown

public void CommandAddToGlobalCooldown(string id, int seconds)

CommandAddToUserCooldown

public void CommandAddToUserCooldown(string id, string userId, Platform platform, int seconds)
Deprecated
public void CommandAddToUserCooldown(string id, int userId, int seconds)

CommandGetCounter

Returns the total number of command uses, by ID

0.2.4
public int CommandGetCounter(string commandId)

CommandGetUserCounter

Returns the total number of times a user has executed the specified command

0.2.4
public CommandCounter CommandGetUserCounter(string userLogin, Platform platform, string commandId)

CommandGetUserCounterById

Returns the total number of times a user has executed the specified command, by ID

0.2.4
public CommandCounter CommandGetUserCounterById(string userId, Platform platform, string commandId)

CommandRemoveAllUserCooldowns

public void CommandRemoveAllUserCooldowns(string id)

CommandRemoveGlobalCooldown

public void CommandRemoveGlobalCooldown(string id)

CommandRemoveUserCooldown

public void CommandRemoveUserCooldown(string id, string userId, Platform platform)
Deprecated
public void CommandRemoveUserCooldown(string id, int userId)

CommandResetAllUserCooldowns

public void CommandResetAllUserCooldowns(string id)

CommandResetAllUserCounters

Resets all counters associated with the specified command using its ID

0.2.4
public void CommandResetAllUserCounters(string commandId)

CommandResetCounter

Resets the total counter for the given command, by ID

0.2.4
public void CommandResetCounter(string commandId)

CommandResetGlobalCooldown

public void CommandResetGlobalCooldown(string id)

CommandResetUserCooldown

public void CommandResetUserCooldown(string id, string userId, Platform platform)
Deprecated
public void CommandResetUserCooldown(string id, int userId)

CommandResetUserCounter

Resets the total counter for a specified user for the given command, by ID

0.2.4
public void CommandResetUserCounter(string commandId, string userId, Platform platform)

CommandResetUsersCounters

public void CommandResetUsersCounters(string userId, Platform platform, bool persisted)

CommandSetGlobalCooldownDuration

public void CommandSetGlobalCooldownDuration(string id, int seconds)

CommandSetUserCooldownDuration

public void CommandSetUserCooldownDuration(string id, int seconds)

DisableCommand

public void DisableCommand(string id)

EnableCommand

public void EnableCommand(string id)

GetCommands

Returns all commands associated with Streamer.bot instance

0.2.5
public List<CommandData> GetCommands()

GetEventType

Fetch the value of the __source variable

public EventType GetEventType()

GetSource

Fetch the value of the eventSource variable

public EventSource GetSource()

ClearNonPersistedGlobals

Remove all non-persisted global variables

public void ClearNonPersistedGlobals()

ClearNonPersistedUserGlobals

Remove all non-persisted global user variables

public void ClearNonPersistedUserGlobals()

GetGlobalVar<T>

Fetch a global variable by name

public T GetGlobalVar<T>(string varName, bool persisted = true)

GetGlobalVarValues

Fetch a list of all global variable values

public List<GlobalVariableValue> GetGlobalVarValues(bool persisted = true)

GetUserVar<T>

Use Twitch and YouTube methods instead

Deprecated
public T GetUserVar<T>(string userName, string varName, bool persisted = true)

SetGlobalVar

Set the value for a global variable

public void SetGlobalVar(string varName, object value, bool persisted = true)

SetUserVar

Use Twitch and YouTube methods instead

Deprecated
public void SetUserVar(string userName, string varName, object value, bool persisted = true)

UnsetAllUsersVar

Unset a user variable for all users

0.2.1
public void UnsetAllUsersVar(string varName, bool persisted = true)

UnsetGlobalVar

Remove a global variable by name

public void UnsetGlobalVar(string varName, bool persisted = true)

UnsetUser

Use Twitch and YouTube methods instead

Deprecated
public void UnsetUser(string userName, bool persisted = true)

UnsetUserVar

Use Twitch and YouTube methods instead

Deprecated
public void UnsetUserVar(string userName, string varName, bool persisted = true)

LogDebug

public void LogDebug(string logLine)

LogError

public void LogError(string logLine)

LogInfo

public void LogInfo(string logLine)

LogVerbose

public void LogVerbose(string logLine)

LogWarn

public void LogWarn(string logLine)

MidiSendControlChange

public void MidiSendControlChange(Guid deviceId, int channel, int controller, int value)

MidiSendControlChangeByName

public void MidiSendControlChangeByName(string name, int channel, int controller, int value)

MidiSendNoteOn

public void MidiSendNoteOn(Guid deviceId, int channel, int note, int velocity, int duration = 0, bool sendNoteOff = false)

MidiSendNoteOnByName

public void MidiSendNoteOnByName(string name, int channel, int note, int velocity, int duration = 0, bool sendNoteOff = false)

MidiSendRaw

public void MidiSendRaw(Guid deviceId, int command, int channel, int data1, int data2)

MidiSendRawByName

public void MidiSendRawByName(string name, int command, int channel, int data1, int data2)

Between

Returns a random int value between(including) min and max

public int Between(int min, int max)

EscapeString

public string EscapeString(string text)

GetVersion

Returns the SemVersion of the current Streamer.bot installation

0.2.4
public string GetVersion()

NextDouble

Returns a double type between 0 and 1. Often used for random percentages

public double NextDouble()

UrlEncode

public string UrlEncode(string text)

Wait

Will make the code wait for specified amount of time, in ms

public void Wait(int milliseconds)

AddQuoteForTrovo

public int AddQuoteForTrovo(string userId, string quote, bool captureGame = false)

AddQuoteForTwitch

public int AddQuoteForTwitch(string userId, string quote, bool captureGame = false)

AddQuoteForYouTube

public int AddQuoteForYouTube(string userId, string quote)

DeleteQuote

public bool DeleteQuote(int quoteId)

GetQuote

public QuoteData GetQuote(int quoteId)

GetQuoteCount

public int GetQuoteCount()

PlaySound

public double PlaySound(string fileName, Single volume = 1, bool finishBeforeContinuing = false, string name, bool useFileName = true)

PlaySoundFromFolder

public double PlaySoundFromFolder(string path, Single volume = 1, bool recursive = false, bool finishBeforeContinuing = false, string name, bool useFileName = true)

StopAllSoundPlayback

Stops all sounds from playing that were started by Streamer.bot

0.2.4
public void StopAllSoundPlayback()

StopSoundPlayback

Stops the currently playing sound from Streamer.bot, by name

0.2.4
public void StopSoundPlayback(string soundName)

KeyboardPress

public void KeyboardPress(string keyPress)

ShowToastNotification

public void ShowToastNotification(string id, string title, string message, string attribution, string iconPath)
public void ShowToastNotification(string title, string message, string attribution, string iconPath)

DisableTimer

public void DisableTimer(string timerName)

DisableTimerById

Disables selected timer, by ID

0.2.4
public void DisableTimerById(string timerId)

EnableTimer

public void EnableTimer(string timerName)

EnableTimerById

Enables selected timer, by ID

0.2.4
public void EnableTimerById(string timerId)

GetTimerState

Get the state of an existing timer

0.2.4
public bool GetTimerState(string timerId)

SetTimerInterval

Set the interval of an existing timer, in seconds

0.2.4
public void SetTimerInterval(string timerId, int interval)

RegisterCustomTrigger

public bool RegisterCustomTrigger(string triggerName, string eventName, String[] categories)

TriggerCodeEvent

Triggers a custom code event (by name)

0.2.5
public void TriggerCodeEvent(string eventName, string json)
0.2.5
public void TriggerCodeEvent(string eventName, Dictionary<string,object> args)
0.2.5
public void TriggerCodeEvent(string eventName, bool useArgs = true)

TriggerEvent

public void TriggerEvent(string eventName, bool useArgs = true)

BroadcastUdp

public int BroadcastUdp(int port, object data)

AddGroup

Creates a new group with the given name

0.2.4
public bool AddGroup(string groupName)

AddUserIdToGroup

Add a user, by ID, to a group

0.2.3
public bool AddUserIdToGroup(string userId, Platform platform, string groupName)

AddUserToGroup

Add a user, by username, to a group

0.2.3
public bool AddUserToGroup(string userName, Platform platform, string groupName)

ClearUsersFromGroup

Remove all users from a group

0.2.3
public bool ClearUsersFromGroup(string groupName)

DeleteGroup

Deletes the group matching the provided name

0.2.4
public bool DeleteGroup(string groupName)

GetGroups

Returns a list of all available groups

0.2.4
public List<string> GetGroups()

GroupExists

Returns bool verifying existence of a group, by name

0.2.4
public bool GroupExists(string groupName)

RemoveUserFromGroup

Remove a user, by username, from a group

0.2.3
public bool RemoveUserFromGroup(string userName, Platform platform, string groupName)

RemoveUserIdFromGroup

Remove a user, by ID, from a group

0.2.3
public bool RemoveUserIdFromGroup(string userId, Platform platform, string groupName)

UserIdInGroup

Check if a user, by ID, is a member of a group

0.2.3
public bool UserIdInGroup(string userId, Platform platform, string groupName)

UserInGroup

Check if a user, by username, is a member of a group

0.2.3
public bool UserInGroup(string userName, Platform platform, string groupName)

UsersInGroup

Fetch a list of users in a group

0.2.3
public List<GroupUser> UsersInGroup(string groupName)

WebsocketBroadcastJson

Send a JSON payload to all clients connected to the Streamer.bot WebSocket Server

public void WebsocketBroadcastJson(string data)

WebsocketBroadcastString

Send a text string to all clients connected to the Streamer.bot WebSocket Server

public void WebsocketBroadcastString(string data)

WebsocketConnect

Connect a configured WebSocket client

public void WebsocketConnect(int connection = 0)

WebsocketCustomServerBroadcast

Broadcast a message to a custom WebSocket server

public void WebsocketCustomServerBroadcast(string data, string sessionId, int connection = 0)

WebsocketCustomServerCloseAllSessions

Disconnect all client sessions from a custom WebSocket server

public void WebsocketCustomServerCloseAllSessions(int connection = 0)

WebsocketCustomServerCloseSession

Disconnect a session from a custom WebSocket server

public void WebsocketCustomServerCloseSession(string sessionId, int connection = 0)

WebsocketCustomServerGetConnectionByName

Get the connection index of a custom WebSocket server

public int WebsocketCustomServerGetConnectionByName(string name)