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
public void DisableActionById(string actionId)
EnableAction
Enables an action, by name
public void EnableAction(string actionName)
EnableActionById
Enables an action, by ID
public void EnableActionById(string actionId)
GetActions
Returns a list of action data for all available actions
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
public bool TryGetArg<T>(string argName, out T& value)
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)
public void CommandAddToUserCooldown(string id, int userId, int seconds)
CommandGetCounter
Returns the total number of command uses, by ID
public int CommandGetCounter(string commandId)
CommandGetUserCounter
Returns the total number of times a user has executed the specified command
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
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)
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
public void CommandResetAllUserCounters(string commandId)
CommandResetCounter
Resets the total counter for the given command, by ID
public void CommandResetCounter(string commandId)
CommandResetGlobalCooldown
public void CommandResetGlobalCooldown(string id)
CommandResetUserCooldown
public void CommandResetUserCooldown(string id, string userId, Platform platform)
public void CommandResetUserCooldown(string id, int userId)
CommandResetUserCounter
Resets the total counter for a specified user for the given command, by ID
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
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>
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
public void SetUserVar(string userName, string varName, object value, bool persisted = true)
UnsetAllUsersVar
Unset a user variable for all users
public void UnsetAllUsersVar(string varName, bool persisted = true)
UnsetGlobalVar
Remove a global variable by name
public void UnsetGlobalVar(string varName, bool persisted = true)
UnsetUser
public void UnsetUser(string userName, bool persisted = true)
UnsetUserVar
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
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
public void StopAllSoundPlayback()
StopSoundPlayback
Stops the currently playing sound from Streamer.bot, by name
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
public void DisableTimerById(string timerId)
EnableTimer
public void EnableTimer(string timerName)
EnableTimerById
Enables selected timer, by ID
public void EnableTimerById(string timerId)
GetTimerState
Get the state of an existing timer
public bool GetTimerState(string timerId)
SetTimerInterval
Set the interval of an existing timer, in seconds
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)
public void TriggerCodeEvent(string eventName, string json)
public void TriggerCodeEvent(string eventName, Dictionary<string,object> args)
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
public bool AddGroup(string groupName)
AddUserIdToGroup
Add a user, by ID, to a group
public bool AddUserIdToGroup(string userId, Platform platform, string groupName)
AddUserToGroup
Add a user, by username, to a group
public bool AddUserToGroup(string userName, Platform platform, string groupName)
ClearUsersFromGroup
Remove all users from a group
public bool ClearUsersFromGroup(string groupName)
DeleteGroup
Deletes the group matching the provided name
public bool DeleteGroup(string groupName)
GetGroups
Returns a list of all available groups
public List<string> GetGroups()
GroupExists
Returns bool verifying existence of a group, by name
public bool GroupExists(string groupName)
RemoveUserFromGroup
Remove a user, by username, from a group
public bool RemoveUserFromGroup(string userName, Platform platform, string groupName)
RemoveUserIdFromGroup
Remove a user, by ID, from a group
public bool RemoveUserIdFromGroup(string userId, Platform platform, string groupName)
UserIdInGroup
Check if a user, by ID, is a member of a group
public bool UserIdInGroup(string userId, Platform platform, string groupName)
UserInGroup
Check if a user, by username, is a member of a group
public bool UserInGroup(string userName, Platform platform, string groupName)
UsersInGroup
Fetch a list of users in a group
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)