TwitchLib.Client  3.0.3
The Client component of TwitchLib.
Public Member Functions | Public Attributes | Static Protected Member Functions | Properties | Events | List of all members
TwitchLib.Client.TwitchClient Class Reference

Represents a client connected to a Twitch channel. More...

Inheritance diagram for TwitchLib.Client.TwitchClient:
TwitchLib.Client.Interfaces.ITwitchClient

Public Member Functions

 TwitchClient (IClient client=null, ClientProtocol protocol=ClientProtocol.WebSocket, ILogger< TwitchClient > logger=null)
 Initializes the TwitchChatClient class. More...
 
void Initialize (ConnectionCredentials credentials, string channel=null, char chatCommandIdentifier='!', char whisperCommandIdentifier='!', bool autoReListenOnExceptions=true)
 Initializes the TwitchChatClient class. More...
 
void SendRaw (string message)
 Sends a RAW IRC message. More...
 
void SendMessage (JoinedChannel channel, string message, bool dryRun=false)
 Sends a formatted Twitch channel chat message. More...
 
void SendMessage (string channel, string message, bool dryRun=false)
 SendMessage wrapper that accepts channel in string form. More...
 
void SendWhisper (string receiver, string message, bool dryRun=false)
 Sends a formatted whisper message to someone. More...
 
void Connect ()
 Start connecting to the Twitch IRC chat. More...
 
void Disconnect ()
 Start disconnecting from the Twitch IRC chat. More...
 
void Reconnect ()
 Start reconnecting to the Twitch IRC chat. More...
 
void AddChatCommandIdentifier (char identifier)
 Adds a character to a list of characters that if found at the start of a message, fires command received event. More...
 
void RemoveChatCommandIdentifier (char identifier)
 Removes a character from a list of characters that if found at the start of a message, fires command received event. More...
 
void AddWhisperCommandIdentifier (char identifier)
 Adds a character to a list of characters that if found at the start of a whisper, fires command received event. More...
 
void RemoveWhisperCommandIdentifier (char identifier)
 Removes a character to a list of characters that if found at the start of a whisper, fires command received event. More...
 
void SetConnectionCredentials (ConnectionCredentials credentials)
 
void JoinChannel (string channel, bool overrideCheck=false)
 Join the Twitch IRC chat of channel . More...
 
void JoinRoom (string channelId, string roomId, bool overrideCheck=false)
 
JoinedChannel GetJoinedChannel (string channel)
 Returns a JoinedChannel object using a passed string/>. More...
 
void LeaveChannel (string channel)
 Leaves (PART) the Twitch IRC chat of channel . More...
 
void LeaveRoom (string channelId, string roomId)
 
void LeaveChannel (JoinedChannel channel)
 Leaves (PART) the Twitch IRC chat of channel . More...
 
void OnReadLineTest (string rawIrc)
 This method allows firing the message parser with a custom irc string allowing for easy testing More...
 
void SendQueuedItem (string message)
 

Public Attributes

Version Version => Assembly.GetEntryAssembly().GetName().Version
 Assembly version of TwitchLib.Client. More...
 
bool IsInitialized => _client != null
 Checks if underlying client has been initialized. More...
 
IReadOnlyList< JoinedChannelJoinedChannels => _joinedChannelManager.GetJoinedChannels()
 A list of all channels the client is currently in. More...
 
bool IsConnected => IsInitialized && _client != null ? _client.IsConnected : false
 The current connection status of the client. More...
 
MessageEmoteCollection ChannelEmotes => _channelEmotes
 The emotes this channel replaces. More...
 
EventHandler OnSelfRaidError
 Fires when TwitchClient attempts to host a channel it is in. More...
 
EventHandler OnNoPermissionError
 Fires when TwitchClient receives generic no permission error from Twitch. More...
 
EventHandler OnRaidedChannelIsMatureAudience
 Fires when newly raided channel is mature audience only. More...
 
EventHandler< OnRitualNewChatterArgsOnRitualNewChatter
 Fires when a ritual for a new chatter is received. More...
 
EventHandler< OnFailureToReceiveJoinConfirmationArgsOnFailureToReceiveJoinConfirmation
 Fires when the client was unable to join a channel. More...
 
EventHandler< OnUnaccountedForArgsOnUnaccountedFor
 Fires when data is received from Twitch that is not able to be parsed. More...
 

Static Protected Member Functions

static void HandleNotInitialized ()
 
static void HandleNotConnected ()
 

Properties

string TwitchUsername [get]
 Username of the user connected via this library. More...
 
WhisperMessage PreviousWhisper [get]
 The most recent whisper received. More...
 
bool DisableAutoPong [get, set]
 Will disable the client from sending automatic PONG responses to PING More...
 
bool WillReplaceEmotes = false [get, set]
 Determines whether Emotes will be replaced in messages. More...
 
bool OverrideBeingHostedCheck = false [get, set]
 If set to true, the library will not check upon channel join that if BeingHosted event is subscribed, that the bot is connected as broadcaster. Only override if the broadcaster is joining multiple channels, including the broadcaster's. More...
 
ConnectionCredentials ConnectionCredentials = false [get]
 Provides access to connection credentials object. More...
 
bool AutoReListenOnException [get, set]
 Provides access to autorelistiononexception on off boolean. More...
 
- Properties inherited from TwitchLib.Client.Interfaces.ITwitchClient
bool AutoReListenOnException [get, set]
 
MessageEmoteCollection ChannelEmotes [get]
 
ConnectionCredentials ConnectionCredentials [get]
 
bool DisableAutoPong [get, set]
 
bool IsConnected [get]
 
bool IsInitialized [get]
 
IReadOnlyList< JoinedChannelJoinedChannels [get]
 
bool OverrideBeingHostedCheck [get, set]
 
WhisperMessage PreviousWhisper [get]
 
string TwitchUsername [get]
 
bool WillReplaceEmotes [get, set]
 

Events

EventHandler< OnLogArgsOnLog
 Fires whenever a log write happens. More...
 
EventHandler< OnConnectedArgsOnConnected
 Fires when client connects to Twitch. More...
 
EventHandler< OnJoinedChannelArgsOnJoinedChannel
 Fires when client joins a channel. More...
 
EventHandler< OnIncorrectLoginArgsOnIncorrectLogin
 Fires on logging in with incorrect details, returns ErrorLoggingInException. More...
 
EventHandler< OnChannelStateChangedArgsOnChannelStateChanged
 Fires when connecting and channel state is changed, returns ChannelState. More...
 
EventHandler< OnUserStateChangedArgsOnUserStateChanged
 Fires when a user state is received, returns UserState. More...
 
EventHandler< OnMessageReceivedArgsOnMessageReceived
 Fires when a new chat message arrives, returns ChatMessage. More...
 
EventHandler< OnWhisperReceivedArgsOnWhisperReceived
 Fires when a new whisper arrives, returns WhisperMessage. More...
 
EventHandler< OnMessageSentArgsOnMessageSent
 Fires when a chat message is sent, returns username, channel and message. More...
 
EventHandler< OnWhisperSentArgsOnWhisperSent
 Fires when a whisper message is sent, returns username and message. More...
 
EventHandler< OnChatCommandReceivedArgsOnChatCommandReceived
 Fires when command (uses custom chat command identifier) is received, returns channel, command, ChatMessage, arguments as string, arguments as list. More...
 
EventHandler< OnWhisperCommandReceivedArgsOnWhisperCommandReceived
 Fires when command (uses custom whisper command identifier) is received, returns command, Whispermessage. More...
 
EventHandler< OnUserJoinedArgsOnUserJoined
 Fires when a new viewer/chatter joined the channel's chat room, returns username and channel. More...
 
EventHandler< OnModeratorJoinedArgsOnModeratorJoined
 Fires when a moderator joined the channel's chat room, returns username and channel. More...
 
EventHandler< OnModeratorLeftArgsOnModeratorLeft
 Fires when a moderator joins the channel's chat room, returns username and channel. More...
 
EventHandler< OnNewSubscriberArgsOnNewSubscriber
 Fires when new subscriber is announced in chat, returns Subscriber. More...
 
EventHandler< OnReSubscriberArgsOnReSubscriber
 Fires when current subscriber renews subscription, returns ReSubscriber. More...
 
EventHandler OnHostLeft
 Fires when a hosted streamer goes offline and hosting is killed. More...
 
EventHandler< OnExistingUsersDetectedArgsOnExistingUsersDetected
 Fires when Twitch notifies client of existing users in chat. More...
 
EventHandler< OnUserLeftArgsOnUserLeft
 Fires when a PART message is received from Twitch regarding a particular viewer More...
 
EventHandler< OnHostingStartedArgsOnHostingStarted
 Fires when the joined channel begins hosting another channel. More...
 
EventHandler< OnHostingStoppedArgsOnHostingStopped
 Fires when the joined channel quits hosting another channel. More...
 
EventHandler< OnDisconnectedEventArgsOnDisconnected
 Fires when bot has disconnected. More...
 
EventHandler< OnConnectionErrorArgsOnConnectionError
 Forces when bot suffers conneciton error. More...
 
EventHandler< OnChatClearedArgsOnChatCleared
 Fires when a channel's chat is cleared. More...
 
EventHandler< OnUserTimedoutArgsOnUserTimedout
 Fires when a viewer gets timedout by any moderator. More...
 
EventHandler< OnLeftChannelArgsOnLeftChannel
 Fires when client successfully leaves a channel. More...
 
EventHandler< OnUserBannedArgsOnUserBanned
 Fires when a viewer gets banned by any moderator. More...
 
EventHandler< OnModeratorsReceivedArgsOnModeratorsReceived
 Fires when a list of moderators is received. More...
 
EventHandler< OnChatColorChangedArgsOnChatColorChanged
 Fires when confirmation of a chat color change request was received. More...
 
EventHandler< OnSendReceiveDataArgsOnSendReceiveData
 Fires when data is either received or sent. More...
 
EventHandler< OnNowHostingArgsOnNowHosting
 Fires when client receives notice that a joined channel is hosting another channel. More...
 
EventHandler< OnBeingHostedArgsOnBeingHosted
 Fires when the library detects another channel has started hosting the broadcaster's stream. MUST BE CONNECTED AS BROADCASTER. More...
 
EventHandler< OnRaidNotificationArgsOnRaidNotification
 Fires when a raid notification is detected in chat More...
 
EventHandler< OnGiftedSubscriptionArgsOnGiftedSubscription
 Fires when a subscription is gifted and announced in chat More...
 
EventHandler< OnCommunitySubscriptionArgsOnCommunitySubscription
 Fires when a community subscription is announced in chat More...
 
EventHandler< OnMessageThrottledEventArgsOnMessageThrottled
 Fires when a Message has been throttled. More...
 
EventHandler< OnWhisperThrottledEventArgsOnWhisperThrottled
 Fires when a Whisper has been throttled. More...
 
EventHandler< OnErrorEventArgsOnError
 Occurs when an Error is thrown in the protocol client More...
 
EventHandler< OnReconnectedEventArgsOnReconnected
 Occurs when a reconnection occurs. More...
 
- Events inherited from TwitchLib.Client.Interfaces.ITwitchClient
EventHandler< OnBeingHostedArgsOnBeingHosted
 
EventHandler< OnChannelStateChangedArgsOnChannelStateChanged
 
EventHandler< OnChatClearedArgsOnChatCleared
 
EventHandler< OnChatColorChangedArgsOnChatColorChanged
 
EventHandler< OnChatCommandReceivedArgsOnChatCommandReceived
 
EventHandler< OnConnectedArgsOnConnected
 
EventHandler< OnConnectionErrorArgsOnConnectionError
 
EventHandler< OnDisconnectedEventArgsOnDisconnected
 
EventHandler< OnExistingUsersDetectedArgsOnExistingUsersDetected
 
EventHandler< OnGiftedSubscriptionArgsOnGiftedSubscription
 
EventHandler< OnHostingStartedArgsOnHostingStarted
 
EventHandler< OnHostingStoppedArgsOnHostingStopped
 
EventHandler OnHostLeft
 
EventHandler< OnIncorrectLoginArgsOnIncorrectLogin
 
EventHandler< OnJoinedChannelArgsOnJoinedChannel
 
EventHandler< OnLeftChannelArgsOnLeftChannel
 
EventHandler< OnLogArgsOnLog
 
EventHandler< OnMessageReceivedArgsOnMessageReceived
 
EventHandler< OnMessageSentArgsOnMessageSent
 
EventHandler< OnModeratorJoinedArgsOnModeratorJoined
 
EventHandler< OnModeratorLeftArgsOnModeratorLeft
 
EventHandler< OnModeratorsReceivedArgsOnModeratorsReceived
 
EventHandler< OnNewSubscriberArgsOnNewSubscriber
 
EventHandler< OnNowHostingArgsOnNowHosting
 
EventHandler< OnRaidNotificationArgsOnRaidNotification
 
EventHandler< OnReSubscriberArgsOnReSubscriber
 
EventHandler< OnSendReceiveDataArgsOnSendReceiveData
 
EventHandler< OnUserBannedArgsOnUserBanned
 
EventHandler< OnUserJoinedArgsOnUserJoined
 
EventHandler< OnUserLeftArgsOnUserLeft
 
EventHandler< OnUserStateChangedArgsOnUserStateChanged
 
EventHandler< OnUserTimedoutArgsOnUserTimedout
 
EventHandler< OnWhisperCommandReceivedArgsOnWhisperCommandReceived
 
EventHandler< OnWhisperReceivedArgsOnWhisperReceived
 
EventHandler< OnWhisperSentArgsOnWhisperSent
 
EventHandler< OnMessageThrottledEventArgsOnMessageThrottled
 
EventHandler< OnWhisperThrottledEventArgsOnWhisperThrottled
 
EventHandler< OnErrorEventArgsOnError
 
EventHandler< OnReconnectedEventArgsOnReconnected
 

Detailed Description

Represents a client connected to a Twitch channel.

Constructor & Destructor Documentation

◆ TwitchClient()

TwitchLib.Client.TwitchClient.TwitchClient ( IClient  client = null,
ClientProtocol  protocol = ClientProtocol.WebSocket,
ILogger< TwitchClient logger = null 
)

Initializes the TwitchChatClient class.

Parameters
clientProtocol Client to use for connection from TwitchLib.Communication. Possible Options Are the TcpClient client or WebSocket client.
loggerOptional ILogger instance to enable logging

Member Function Documentation

◆ AddChatCommandIdentifier()

void TwitchLib.Client.TwitchClient.AddChatCommandIdentifier ( char  identifier)

Adds a character to a list of characters that if found at the start of a message, fires command received event.

Parameters
identifierCharacter, that if found at start of message, fires command received event.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ AddWhisperCommandIdentifier()

void TwitchLib.Client.TwitchClient.AddWhisperCommandIdentifier ( char  identifier)

Adds a character to a list of characters that if found at the start of a whisper, fires command received event.

Parameters
identifierCharacter, that if found at start of message, fires command received event.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ Connect()

void TwitchLib.Client.TwitchClient.Connect ( )

Start connecting to the Twitch IRC chat.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ Disconnect()

void TwitchLib.Client.TwitchClient.Disconnect ( )

Start disconnecting from the Twitch IRC chat.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ GetJoinedChannel()

JoinedChannel TwitchLib.Client.TwitchClient.GetJoinedChannel ( string  channel)

Returns a JoinedChannel object using a passed string/>.

Parameters
channelString channel to search for.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ HandleNotConnected()

static void TwitchLib.Client.TwitchClient.HandleNotConnected ( )
staticprotected

◆ HandleNotInitialized()

static void TwitchLib.Client.TwitchClient.HandleNotInitialized ( )
staticprotected

◆ Initialize()

void TwitchLib.Client.TwitchClient.Initialize ( ConnectionCredentials  credentials,
string  channel = null,
char  chatCommandIdentifier = '!',
char  whisperCommandIdentifier = '!',
bool  autoReListenOnExceptions = true 
)

Initializes the TwitchChatClient class.

Parameters
channelThe channel to connect to.
credentialsThe credentials to use to log in.
chatCommandIdentifierThe identifier to be used for reading and writing commands from chat.
whisperCommandIdentifierThe identifier to be used for reading and writing commands from whispers.
autoReListenOnExceptionsBy default, TwitchClient will silence exceptions and auto-relisten for overall stability. For debugging, you may wish to have the exception bubble up, set this to false.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ JoinChannel()

void TwitchLib.Client.TwitchClient.JoinChannel ( string  channel,
bool  overrideCheck = false 
)

Join the Twitch IRC chat of channel .

Parameters
channelThe channel to join.
overrideCheckOverride a join check.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ JoinRoom()

void TwitchLib.Client.TwitchClient.JoinRoom ( string  channelId,
string  roomId,
bool  overrideCheck = false 
)

◆ LeaveChannel() [1/2]

void TwitchLib.Client.TwitchClient.LeaveChannel ( string  channel)

Leaves (PART) the Twitch IRC chat of channel .

Parameters
channelThe channel to leave.
Returns
True is returned if the passed channel was found, false if channel not found.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ LeaveChannel() [2/2]

void TwitchLib.Client.TwitchClient.LeaveChannel ( JoinedChannel  channel)

Leaves (PART) the Twitch IRC chat of channel .

Parameters
channelThe JoinedChannel object to leave.
Returns
True is returned if the passed channel was found, false if channel not found.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ LeaveRoom()

void TwitchLib.Client.TwitchClient.LeaveRoom ( string  channelId,
string  roomId 
)

◆ OnReadLineTest()

void TwitchLib.Client.TwitchClient.OnReadLineTest ( string  rawIrc)

This method allows firing the message parser with a custom irc string allowing for easy testing

Parameters
rawIrcThis should be a raw IRC message resembling one received from Twitch IRC.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ Reconnect()

void TwitchLib.Client.TwitchClient.Reconnect ( )

Start reconnecting to the Twitch IRC chat.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ RemoveChatCommandIdentifier()

void TwitchLib.Client.TwitchClient.RemoveChatCommandIdentifier ( char  identifier)

Removes a character from a list of characters that if found at the start of a message, fires command received event.

Parameters
identifierCommand identifier to removed from identifier list.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ RemoveWhisperCommandIdentifier()

void TwitchLib.Client.TwitchClient.RemoveWhisperCommandIdentifier ( char  identifier)

Removes a character to a list of characters that if found at the start of a whisper, fires command received event.

Parameters
identifierCommand identifier to removed from identifier list.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ SendMessage() [1/2]

void TwitchLib.Client.TwitchClient.SendMessage ( JoinedChannel  channel,
string  message,
bool  dryRun = false 
)

Sends a formatted Twitch channel chat message.

Parameters
messageThe message to be sent.
dryRunIf set to true, the message will not actually be sent for testing purposes.
channelChannel to send message to.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ SendMessage() [2/2]

void TwitchLib.Client.TwitchClient.SendMessage ( string  channel,
string  message,
bool  dryRun = false 
)

SendMessage wrapper that accepts channel in string form.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ SendQueuedItem()

void TwitchLib.Client.TwitchClient.SendQueuedItem ( string  message)

◆ SendRaw()

void TwitchLib.Client.TwitchClient.SendRaw ( string  message)

Sends a RAW IRC message.

Parameters
messageThe RAW message to be sent.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ SendWhisper()

void TwitchLib.Client.TwitchClient.SendWhisper ( string  receiver,
string  message,
bool  dryRun = false 
)

Sends a formatted whisper message to someone.

Parameters
receiverThe receiver of the whisper.
messageThe message to be sent.
dryRunIf set to true, the message will not actually be sent for testing purposes.

Implements TwitchLib.Client.Interfaces.ITwitchClient.

◆ SetConnectionCredentials()

void TwitchLib.Client.TwitchClient.SetConnectionCredentials ( ConnectionCredentials  credentials)

Member Data Documentation

◆ ChannelEmotes

MessageEmoteCollection TwitchLib.Client.TwitchClient.ChannelEmotes => _channelEmotes

The emotes this channel replaces.

Twitch-handled emotes are automatically added to this collection (which also accounts for managing user emote permissions such as sub-only emotes). Third-party emotes will have to be manually added according to the availability rules defined by the third-party.

◆ IsConnected

bool TwitchLib.Client.TwitchClient.IsConnected => IsInitialized && _client != null ? _client.IsConnected : false

The current connection status of the client.

◆ IsInitialized

bool TwitchLib.Client.TwitchClient.IsInitialized => _client != null

Checks if underlying client has been initialized.

◆ JoinedChannels

IReadOnlyList<JoinedChannel> TwitchLib.Client.TwitchClient.JoinedChannels => _joinedChannelManager.GetJoinedChannels()

A list of all channels the client is currently in.

◆ OnFailureToReceiveJoinConfirmation

EventHandler<OnFailureToReceiveJoinConfirmationArgs> TwitchLib.Client.TwitchClient.OnFailureToReceiveJoinConfirmation

Fires when the client was unable to join a channel.

◆ OnNoPermissionError

EventHandler TwitchLib.Client.TwitchClient.OnNoPermissionError

Fires when TwitchClient receives generic no permission error from Twitch.

◆ OnRaidedChannelIsMatureAudience

EventHandler TwitchLib.Client.TwitchClient.OnRaidedChannelIsMatureAudience

Fires when newly raided channel is mature audience only.

◆ OnRitualNewChatter

EventHandler<OnRitualNewChatterArgs> TwitchLib.Client.TwitchClient.OnRitualNewChatter

Fires when a ritual for a new chatter is received.

◆ OnSelfRaidError

EventHandler TwitchLib.Client.TwitchClient.OnSelfRaidError

Fires when TwitchClient attempts to host a channel it is in.

◆ OnUnaccountedFor

EventHandler<OnUnaccountedForArgs> TwitchLib.Client.TwitchClient.OnUnaccountedFor

Fires when data is received from Twitch that is not able to be parsed.

◆ Version

Version TwitchLib.Client.TwitchClient.Version => Assembly.GetEntryAssembly().GetName().Version

Assembly version of TwitchLib.Client.

Property Documentation

◆ AutoReListenOnException

bool TwitchLib.Client.TwitchClient.AutoReListenOnException
getset

Provides access to autorelistiononexception on off boolean.

◆ ConnectionCredentials

ConnectionCredentials TwitchLib.Client.TwitchClient.ConnectionCredentials = false
get

Provides access to connection credentials object.

◆ DisableAutoPong

bool TwitchLib.Client.TwitchClient.DisableAutoPong
getset

Will disable the client from sending automatic PONG responses to PING

◆ OverrideBeingHostedCheck

bool TwitchLib.Client.TwitchClient.OverrideBeingHostedCheck = false
getset

If set to true, the library will not check upon channel join that if BeingHosted event is subscribed, that the bot is connected as broadcaster. Only override if the broadcaster is joining multiple channels, including the broadcaster's.

◆ PreviousWhisper

WhisperMessage TwitchLib.Client.TwitchClient.PreviousWhisper
get

The most recent whisper received.

◆ TwitchUsername

string TwitchLib.Client.TwitchClient.TwitchUsername
get

Username of the user connected via this library.

◆ WillReplaceEmotes

bool TwitchLib.Client.TwitchClient.WillReplaceEmotes = false
getset

Determines whether Emotes will be replaced in messages.

Event Documentation

◆ OnBeingHosted

EventHandler<OnBeingHostedArgs> TwitchLib.Client.TwitchClient.OnBeingHosted

Fires when the library detects another channel has started hosting the broadcaster's stream. MUST BE CONNECTED AS BROADCASTER.

◆ OnChannelStateChanged

EventHandler<OnChannelStateChangedArgs> TwitchLib.Client.TwitchClient.OnChannelStateChanged

Fires when connecting and channel state is changed, returns ChannelState.

◆ OnChatCleared

EventHandler<OnChatClearedArgs> TwitchLib.Client.TwitchClient.OnChatCleared

Fires when a channel's chat is cleared.

◆ OnChatColorChanged

EventHandler<OnChatColorChangedArgs> TwitchLib.Client.TwitchClient.OnChatColorChanged

Fires when confirmation of a chat color change request was received.

◆ OnChatCommandReceived

EventHandler<OnChatCommandReceivedArgs> TwitchLib.Client.TwitchClient.OnChatCommandReceived

Fires when command (uses custom chat command identifier) is received, returns channel, command, ChatMessage, arguments as string, arguments as list.

◆ OnCommunitySubscription

EventHandler<OnCommunitySubscriptionArgs> TwitchLib.Client.TwitchClient.OnCommunitySubscription

Fires when a community subscription is announced in chat

◆ OnConnected

EventHandler<OnConnectedArgs> TwitchLib.Client.TwitchClient.OnConnected

Fires when client connects to Twitch.

◆ OnConnectionError

EventHandler<OnConnectionErrorArgs> TwitchLib.Client.TwitchClient.OnConnectionError

Forces when bot suffers conneciton error.

◆ OnDisconnected

EventHandler<OnDisconnectedEventArgs> TwitchLib.Client.TwitchClient.OnDisconnected

Fires when bot has disconnected.

◆ OnError

EventHandler<OnErrorEventArgs> TwitchLib.Client.TwitchClient.OnError

Occurs when an Error is thrown in the protocol client

◆ OnExistingUsersDetected

EventHandler<OnExistingUsersDetectedArgs> TwitchLib.Client.TwitchClient.OnExistingUsersDetected

Fires when Twitch notifies client of existing users in chat.

◆ OnGiftedSubscription

EventHandler<OnGiftedSubscriptionArgs> TwitchLib.Client.TwitchClient.OnGiftedSubscription

Fires when a subscription is gifted and announced in chat

◆ OnHostingStarted

EventHandler<OnHostingStartedArgs> TwitchLib.Client.TwitchClient.OnHostingStarted

Fires when the joined channel begins hosting another channel.

◆ OnHostingStopped

EventHandler<OnHostingStoppedArgs> TwitchLib.Client.TwitchClient.OnHostingStopped

Fires when the joined channel quits hosting another channel.

◆ OnHostLeft

EventHandler TwitchLib.Client.TwitchClient.OnHostLeft

Fires when a hosted streamer goes offline and hosting is killed.

◆ OnIncorrectLogin

EventHandler<OnIncorrectLoginArgs> TwitchLib.Client.TwitchClient.OnIncorrectLogin

Fires on logging in with incorrect details, returns ErrorLoggingInException.

◆ OnJoinedChannel

EventHandler<OnJoinedChannelArgs> TwitchLib.Client.TwitchClient.OnJoinedChannel

Fires when client joins a channel.

◆ OnLeftChannel

EventHandler<OnLeftChannelArgs> TwitchLib.Client.TwitchClient.OnLeftChannel

Fires when client successfully leaves a channel.

◆ OnLog

EventHandler<OnLogArgs> TwitchLib.Client.TwitchClient.OnLog

Fires whenever a log write happens.

◆ OnMessageReceived

EventHandler<OnMessageReceivedArgs> TwitchLib.Client.TwitchClient.OnMessageReceived

Fires when a new chat message arrives, returns ChatMessage.

◆ OnMessageSent

EventHandler<OnMessageSentArgs> TwitchLib.Client.TwitchClient.OnMessageSent

Fires when a chat message is sent, returns username, channel and message.

◆ OnMessageThrottled

EventHandler<OnMessageThrottledEventArgs> TwitchLib.Client.TwitchClient.OnMessageThrottled

Fires when a Message has been throttled.

◆ OnModeratorJoined

EventHandler<OnModeratorJoinedArgs> TwitchLib.Client.TwitchClient.OnModeratorJoined

Fires when a moderator joined the channel's chat room, returns username and channel.

◆ OnModeratorLeft

EventHandler<OnModeratorLeftArgs> TwitchLib.Client.TwitchClient.OnModeratorLeft

Fires when a moderator joins the channel's chat room, returns username and channel.

◆ OnModeratorsReceived

EventHandler<OnModeratorsReceivedArgs> TwitchLib.Client.TwitchClient.OnModeratorsReceived

Fires when a list of moderators is received.

◆ OnNewSubscriber

EventHandler<OnNewSubscriberArgs> TwitchLib.Client.TwitchClient.OnNewSubscriber

Fires when new subscriber is announced in chat, returns Subscriber.

◆ OnNowHosting

EventHandler<OnNowHostingArgs> TwitchLib.Client.TwitchClient.OnNowHosting

Fires when client receives notice that a joined channel is hosting another channel.

◆ OnRaidNotification

EventHandler<OnRaidNotificationArgs> TwitchLib.Client.TwitchClient.OnRaidNotification

Fires when a raid notification is detected in chat

◆ OnReconnected

EventHandler<OnReconnectedEventArgs> TwitchLib.Client.TwitchClient.OnReconnected

Occurs when a reconnection occurs.

◆ OnReSubscriber

EventHandler<OnReSubscriberArgs> TwitchLib.Client.TwitchClient.OnReSubscriber

Fires when current subscriber renews subscription, returns ReSubscriber.

◆ OnSendReceiveData

EventHandler<OnSendReceiveDataArgs> TwitchLib.Client.TwitchClient.OnSendReceiveData

Fires when data is either received or sent.

◆ OnUserBanned

EventHandler<OnUserBannedArgs> TwitchLib.Client.TwitchClient.OnUserBanned

Fires when a viewer gets banned by any moderator.

◆ OnUserJoined

EventHandler<OnUserJoinedArgs> TwitchLib.Client.TwitchClient.OnUserJoined

Fires when a new viewer/chatter joined the channel's chat room, returns username and channel.

◆ OnUserLeft

EventHandler<OnUserLeftArgs> TwitchLib.Client.TwitchClient.OnUserLeft

Fires when a PART message is received from Twitch regarding a particular viewer

◆ OnUserStateChanged

EventHandler<OnUserStateChangedArgs> TwitchLib.Client.TwitchClient.OnUserStateChanged

Fires when a user state is received, returns UserState.

◆ OnUserTimedout

EventHandler<OnUserTimedoutArgs> TwitchLib.Client.TwitchClient.OnUserTimedout

Fires when a viewer gets timedout by any moderator.

◆ OnWhisperCommandReceived

EventHandler<OnWhisperCommandReceivedArgs> TwitchLib.Client.TwitchClient.OnWhisperCommandReceived

Fires when command (uses custom whisper command identifier) is received, returns command, Whispermessage.

◆ OnWhisperReceived

EventHandler<OnWhisperReceivedArgs> TwitchLib.Client.TwitchClient.OnWhisperReceived

Fires when a new whisper arrives, returns WhisperMessage.

◆ OnWhisperSent

EventHandler<OnWhisperSentArgs> TwitchLib.Client.TwitchClient.OnWhisperSent

Fires when a whisper message is sent, returns username and message.

◆ OnWhisperThrottled

EventHandler<OnWhisperThrottledEventArgs> TwitchLib.Client.TwitchClient.OnWhisperThrottled

Fires when a Whisper has been throttled.


The documentation for this class was generated from the following file: