|
| static void | LogInfo (string message) |
| static void | LogWarn (string message) |
| static void | LogError (string message) |
| static void | LogDebug (string message) |
| static void | LogVerbose (string message) |
| static void | SendMessage (string message, bool useBot=true) |
| static void | SendAction (string action, bool useBot=true) |
| static bool | SendWhisper (string userName, string message) |
| static void | SetGlobalVar (string name, object value, bool persisted=true) |
| static object | GetGlobalVar (string name, bool persisted=true) |
| static void | UnsetGlobalVar (string name, bool persisted=true) |
| static T | GetGlobalVar< T > (string name, bool persisted=true) |
| static void | SetArgument (string name, object value) |
| static bool | TryGetArg (string name, out object value) |
| static T | GetArg< T > (string name) |
| static bool | TryGetArg< T > (string name, out T value) |
| static bool | RunAction (string actionName, bool runImmediately=true) |
| static bool | RunActionById (string actionId, bool runImmediately=true) |
| static void | Wait (int milliseconds) |
| static int | Between (int min, int max) |
| static double | NextDouble () |
| static bool | ObsIsConnected () |
| static bool | ObsIsStreaming () |
| static bool | ObsIsRecording () |
| static void | ObsSetCurrentScene (string sceneName) |
| static string | ObsGetCurrentScene () |
| static void | ObsSetSourceVisibility (string scene, string source, bool visible) |
| static void | ObsShowSource (string scene, string source) |
| static void | ObsHideSource (string scene, string source) |
| static void | ObsSetMediaSourceFile (string scene, string source, string file) |
| static void | PlaySound (string filePath, float volume=1.0f, bool finishBeforeContinuing=false) |
| static string | HttpGet (string url) |
| | Perform an HTTP GET request and return the response body.
|
| static string | HttpPost (string url, string body, string contentType="application/json") |
| | Perform an HTTP POST request.
|
| static string | HttpPut (string url, string body, string contentType="application/json") |
| | Perform an HTTP PUT request.
|
| static string | HttpDelete (string url) |
| | Perform an HTTP DELETE request.
|
| static bool | HttpDownload (string url, string savePath) |
| | Download a file from a URL.
|
| static string | GetUrlContent (string url) |
| | Get URL content.
|
| static bool | PostToUrl (string url, string body, string contentType="application/json") |
| | Post to a URL.
|
| static string | FileReadAllText (string path) |
| | Read all text from a file.
|
| static string[] | FileReadAllLines (string path) |
| | Read all lines from a file.
|
| static bool | FileWriteAllText (string path, string content) |
| | Write text to a file (overwrites existing content).
|
| static bool | FileAppendAllText (string path, string content) |
| | Append text to a file.
|
| static bool | FileExists (string path) |
| | Check if a file exists.
|
| static bool | FileDelete (string path) |
| | Delete a file.
|
| static bool | FileCopy (string source, string dest, bool overwrite=false) |
| | Copy a file.
|
| static bool | FileMove (string source, string dest) |
| | Move/rename a file.
|
| static bool | DirectoryExists (string path) |
| | Check if a directory exists.
|
| static bool | DirectoryCreate (string path) |
| | Create a directory.
|
| static bool | DirectoryDelete (string path, bool recursive=false) |
| | Delete a directory.
|
| static string[] | DirectoryGetFiles (string path, string pattern="*") |
| | Get files in a directory.
|
| static string[] | DirectoryGetDirectories (string path) |
| | Get subdirectories in a directory.
|
| static string | GetDataPath () |
| | Get the data directory path.
|
| static string | GetScriptsPath () |
| | Get the scripts directory path.
|
| static bool | TwitchIsConnected () |
| static string | TwitchGetBroadcasterId () |
| static string | TwitchGetBroadcasterName () |
| static bool | SendTwitchMessage (string message, string replyToId=null) |
| static void | TwitchAnnounce (string message, string color="primary") |
| static bool | TwitchSendWhisper (string userId, string message) |
| static bool | TwitchDeleteMessage (string messageId) |
| static bool | TwitchClearChat () |
| static bool | TwitchBanUser (string userId, string reason=null) |
| static bool | TwitchUnbanUser (string userId) |
| static bool | TwitchTimeoutUser (string userId, int seconds, string reason=null) |
| static bool | TwitchAddModerator (string userId) |
| static bool | TwitchRemoveModerator (string userId) |
| static bool | TwitchAddVip (string userId) |
| static bool | TwitchRemoveVip (string userId) |
| static string | TwitchGetUserInfoById (string userId) |
| static string | TwitchGetUserInfoByLogin (string username) |
| static string | TwitchGetExtendedUserInfoById (string userId) |
| static string | TwitchGetExtendedUserInfoByLogin (string username) |
| static bool | TwitchIsUserFollowing (string userId) |
| static bool | TwitchSetTitle (string title) |
| static bool | TwitchSetGame (string gameNameOrId) |
| static string | TwitchGetChannelInfo () |
| static string | TwitchGetGameIdByName (string gameName) |
| static string | TwitchPollCreate (string title, string[] choices, int durationSeconds=60) |
| static bool | TwitchPollTerminate (string pollId) |
| static bool | TwitchPollArchive (string pollId) |
| static string | TwitchGetPolls () |
| static string | TwitchPredictionCreate (string title, string[] outcomes, int windowSeconds=60) |
| static bool | TwitchPredictionLock (string predictionId) |
| static bool | TwitchPredictionResolve (string predictionId, string winningOutcomeId) |
| static bool | TwitchPredictionCancel (string predictionId) |
| static string | TwitchGetPredictions () |
| static string | TwitchGetRewards () |
| static bool | TwitchCreateReward (string title, int cost, string optionsJson=null) |
| static bool | TwitchUpdateReward (string rewardId, string updatesJson) |
| static bool | TwitchDeleteReward (string rewardId) |
| static bool | TwitchEnableReward (string rewardId) |
| static bool | TwitchDisableReward (string rewardId) |
| static bool | TwitchPauseReward (string rewardId) |
| static bool | TwitchUnpauseReward (string rewardId) |
| static bool | TwitchFulfillRedemption (string rewardId, string redemptionId) |
| static bool | TwitchCancelRedemption (string rewardId, string redemptionId) |
| static int | TwitchGetRewardCounter (string rewardId) |
| static int | TwitchGetRewardUserCounter (string rewardId, string username) |
| static int | TwitchGetRewardUserCounterById (string rewardId, string userId) |
| static bool | TwitchResetRewardCounter (string rewardId) |
| static bool | TwitchResetUserRewardCounter (string rewardId, string username) |
| static bool | TwitchRewardGroupEnable (string groupName) |
| static bool | TwitchRewardGroupDisable (string groupName) |
| static bool | TwitchRewardGroupPause (string groupName) |
| static bool | TwitchRewardGroupUnpause (string groupName) |
| static bool | TwitchRewardGroupToggleEnable (string groupName) |
| static bool | TwitchRewardGroupTogglePause (string groupName) |
| static bool | TwitchUpdateRewardTitle (string rewardId, string title) |
| static bool | TwitchUpdateRewardPrompt (string rewardId, string prompt) |
| static bool | TwitchUpdateRewardCost (string rewardId, int cost) |
| static bool | TwitchUpdateRewardBackgroundColor (string rewardId, string color) |
| static bool | TwitchUpdateRewardCooldown (string rewardId, int seconds) |
| static string | TwitchCreateClip (bool hasDelay=false) |
| static string | TwitchCreateMarker (string description=null) |
| static string | TwitchGetClips () |
| static bool | TwitchStartRaid (string toChannelId) |
| static bool | TwitchCancelRaid () |
| static bool | TwitchStartCommercial (int lengthSeconds=30) |
| static string | TwitchGetAdSchedule () |
| static string | TwitchGetChatSettings () |
| static bool | TwitchSetEmoteOnlyMode (bool enabled) |
| static bool | TwitchSetFollowerOnlyMode (bool enabled, int durationMinutes=0) |
| static bool | TwitchSetSubscriberOnlyMode (bool enabled) |
| static bool | TwitchSetSlowMode (bool enabled, int waitTimeSeconds=30) |
| static bool | TwitchSendShoutout (string toUserId) |
| static bool | TwitchSendShoutoutByLogin (string toUserLogin) |
| static bool | TwitchBlockUser (string userId) |
| static bool | TwitchBlockUserByName (string username) |
| static bool | TwitchUnblockUser (string userId) |
| static bool | TwitchUnblockUserByName (string username) |
| static bool | TwitchAddChannelTag (string tag) |
| static bool | TwitchRemoveChannelTag (string tag) |
| static bool | TwitchSetChannelTags (string[] tags) |
| static bool | TwitchClearChannelTags () |
| static string[] | TwitchGetChannelTags () |
| static bool | TwitchShieldModeOn () |
| static bool | TwitchShieldModeOff () |
| static bool | TwitchIsShieldModeActive () |
| static long | TwitchGetBitsDonatedByUserId (string userId) |
| static long | TwitchGetChannelPointsUsedByUserId (string userId) |
| static string | TwitchGetUserVar (string username, string varName, string defaultValue=null) |
| static string | TwitchGetUserVarById (string userId, string varName, string defaultValue=null) |
| static bool | TwitchSetUserVar (string username, string varName, string value, bool persist=false) |
| static bool | TwitchSetUserVarById (string userId, string varName, string value, bool persist=false) |
| static bool | TwitchUnsetUserVar (string username, string varName) |
| static bool | TwitchUnsetUserVarById (string userId, string varName) |
| static bool | TwitchUnsetUser (string username) |
| static bool | TwitchUnsetUserById (string userId) |
| static bool | YouTubeIsConnected () |
| static string | YouTubeGetChannelId () |
| static string | YouTubeGetChannelName () |
| static bool | SendYouTubeMessage (string message) |
| static bool | SendYouTubeMessageToLatestMonitored (string message) |
| static bool | YouTubeDeleteMessage (string messageId) |
| static bool | YouTubeBanUser (string userId) |
| static bool | YouTubeBanUserByName (string username) |
| static bool | YouTubeUnbanUser (string banId) |
| static bool | YouTubeTimeoutUser (string userId, int seconds) |
| static bool | YouTubeTimeoutUserByName (string username, int seconds) |
| static bool | YouTubeSetTitle (string title) |
| static bool | YouTubeSetDescription (string description) |
| static bool | YouTubeSetCategory (string categoryId) |
| static bool | YouTubeSetPrivacy (string privacy) |
| static bool | YouTubeSetMetaData (string title, string description, string categoryId) |
| static int | YouTubeGetViewerCount () |
| static string | YouTubeGetUserVar (string username, string varName, string defaultValue=null) |
| static string | YouTubeGetUserVarById (string userId, string varName, string defaultValue=null) |
| static bool | YouTubeSetUserVar (string username, string varName, string value, bool persist=false) |
| static bool | YouTubeSetUserVarById (string userId, string varName, string value, bool persist=false) |
| static bool | YouTubeUnsetUserVar (string username, string varName) |
| static bool | YouTubeUnsetUserVarById (string userId, string varName) |
| static bool | YouTubeUnsetUser (string username) |
| static bool | YouTubeUnsetUserById (string userId) |
| static string | ObsSendRaw (string requestType, string requestDataJson) |
| static bool | ObsTakeScreenshot (string sourceName=null, string filePath=null) |
| static bool | ObsSetBrowserSource (string sourceName, string url) |
| static string | ObsGetScenes () |
| static string | ObsGetSources (string sceneName=null) |
| static bool | ObsShowFilter (string sourceName, string filterName) |
| static bool | ObsHideFilter (string sourceName, string filterName) |
| static bool | ObsToggleFilter (string sourceName, string filterName) |
| static bool | ObsSetSourceFilterEnabled (string sourceName, string filterName, bool enabled) |
| static bool | ObsIsFilterEnabled (string sourceName, string filterName) |
| static bool | ObsSourceMute (string sourceName) |
| static bool | ObsSourceUnMute (string sourceName) |
| static bool | ObsSourceMuteToggle (string sourceName) |
| static bool | ObsSetSourceMuteState (string sourceName, int state) |
| static bool | ObsSetVolume (string sourceName, double volume) |
| static bool | ObsStartRecording () |
| static bool | ObsStopRecording () |
| static bool | ObsPauseRecording () |
| static bool | ObsResumeRecording () |
| static bool | ObsStartStreaming () |
| static bool | ObsStopStreaming () |
| static bool | ObsStartReplayBuffer () |
| static bool | ObsStopReplayBuffer () |
| static bool | ObsSaveReplayBuffer () |
| static bool | ObsSetTextSource (string sourceName, string text) |
| static bool | ObsSetGdiText (string sourceName, string text) |
| static bool | ObsSetImageSource (string sourceName, string filePath) |
| static bool | ObsSetMediaSource (string sourceName, string filePath, bool autoPlay=true) |
| static bool | ObsMediaPlay (string sourceName) |
| static bool | ObsMediaPause (string sourceName) |
| static bool | ObsMediaStop (string sourceName) |
| static bool | ObsMediaRestart (string sourceName) |
| static bool | ObsMediaNext (string sourceName) |
| static bool | ObsMediaPrevious (string sourceName) |
| static bool | ObsHideGroupsSources (string sceneName, string groupName) |
| static bool | ObsSetRandomGroupSourceVisible (string sceneName, string groupName) |
| static string | ObsGetGroupSources (string sceneName, string groupName) |
| static bool | ObsSetColorSourceColor (string sourceName, string hexColor) |
| static bool | ObsSetColorSourceRandomColor (string sourceName) |
| static void | SetUserVar (string userName, string name, object value, bool persisted=true) |
| static T | GetUserVar< T > (string userName, string name, bool persisted=true) |
| static void | UnsetUserVar (string userName, string name, bool persisted=true) |
CPH (C# Plugin Host) - Main interface for C# scripts.
Provides access to chat, OBS, Twitch, actions, variables, and more.
Usage in scripts: public class CPHInline { public bool Execute() { CPH.LogInfo("Hello from C#!"); return true; } }