TwitchLib 3.5.3
Loading...
Searching...
No Matches
TwitchLib.Client.Models.ChatMessage Class Reference

Class represents ChatMessage in a Twitch channel. More...

Inheritance diagram for TwitchLib.Client.Models.ChatMessage:
TwitchLib.Client.Models.TwitchLibMessage

Public Member Functions

 ChatMessage (string botUsername, IrcMessage ircMessage, ref MessageEmoteCollection emoteCollection, bool replaceEmotes=false)
 Constructor for ChatMessage object. More...
 
 ChatMessage (string botUsername, string userId, string userName, string displayName, string colorHex, Color color, EmoteSet emoteSet, string message, UserType userType, string channel, string id, bool isSubscriber, int subscribedMonthCount, string roomId, bool isTurbo, bool isModerator, bool isMe, bool isBroadcaster, bool isVip, bool isPartner, bool isStaff, Noisy noisy, string rawIrcMessage, string emoteReplacedMessage, List< KeyValuePair< string, string > > badges, CheerBadge cheerBadge, int bits, double bitsInDollars)
 

Protected Attributes

readonly MessageEmoteCollection _emoteCollection
 

Properties

List< KeyValuePair< string, string > > BadgeInfo [get]
 Information associated with badges. Not all badges will be in this list. Use carefully. More...
 
int Bits [get]
 If viewer sent bits in their message, total amount will be here. More...
 
double BitsInDollars [get]
 Number of USD (United States Dollars) spent on bits. More...
 
string Channel [get]
 Twitch channel message was sent from (useful for multi-channel bots). More...
 
CheerBadge CheerBadge [get]
 If a cheer badge exists, this property represents the raw value and color (more later). Can be null. More...
 
string CustomRewardId [get]
 If a custom reward is present with the message, the ID will be set (null by default) More...
 
string EmoteReplacedMessage [get]
 Text after emotes have been handled (if desired). Will be null if replaceEmotes is false. More...
 
string Id [get]
 Unique message identifier assigned by Twitch More...
 
bool IsBroadcaster [get]
 Chat message from broadcaster identifier flag More...
 
bool IsFirstMessage [get]
 Chat message is the first message, ever, from this user in this chat More...
 
bool IsHighlighted [get, set]
 Chat message is highlighted in chat via channel points More...
 
bool IsMe [get]
 Chat message /me identifier flag. More...
 
bool IsModerator [get]
 Channel specific moderator status. More...
 
bool IsSkippingSubMode [get, set]
 Message used channel points to skip sub mode More...
 
bool IsSubscriber [get]
 Channel specific subscriber status. More...
 
bool IsVip [get]
 Message is from channel VIP More...
 
bool IsStaff [get]
 Message is from a Twitch Staff member More...
 
bool IsPartner [get]
 Message is from a Twitch Partner More...
 
string Message [get]
 Twitch chat message contents. More...
 
Noisy Noisy [get]
 Experimental property noisy determination by Twitch. More...
 
string RoomId [get]
 Unique identifier of chat room. More...
 
int SubscribedMonthCount [get]
 Number of months a person has been subbed. More...
 
string TmiSentTs [get]
 Sent timestamp generated by TMI More...
 
ChatReply ChatReply [get]
 
- Properties inherited from TwitchLib.Client.Models.TwitchLibMessage
List< KeyValuePair< string, string > > Badges [get, protected set]
 List of key-value pair badges. More...
 
string BotUsername [get, protected set]
 Twitch username of the bot that received the message. More...
 
Color Color [get, protected set]
 Property representing HEX color as a System.Drawing.Color object. More...
 
string ColorHex [get, protected set]
 Hex representation of username color in chat (THIS CAN BE NULL IF VIEWER HASN'T SET COLOR). More...
 
string DisplayName [get, protected set]
 Case-sensitive username of sender of chat message. More...
 
EmoteSet EmoteSet [get, protected set]
 Emote Ids that exist in message. More...
 
bool IsTurbo [get, protected set]
 Twitch site-wide turbo status. More...
 
string UserId [get, protected set]
 Twitch-unique integer assigned on per account basis. More...
 
string Username [get, protected set]
 Username of sender of chat message. More...
 
UserType UserType [get, protected set]
 User type can be viewer, moderator, global mod, admin, or staff More...
 
string RawIrcMessage [get, protected set]
 Raw IRC-style text received from Twitch. More...
 

Detailed Description

Class represents ChatMessage in a Twitch channel.

Constructor & Destructor Documentation

◆ ChatMessage() [1/2]

TwitchLib.Client.Models.ChatMessage.ChatMessage ( string  botUsername,
IrcMessage  ircMessage,
ref MessageEmoteCollection  emoteCollection,
bool  replaceEmotes = false 
)

Constructor for ChatMessage object.

Parameters
botUsernameThe username of the bot that received the message.
ircMessageThe IRC message from Twitch to be processed.
emoteCollectionThe MessageEmoteCollection to register new emotes on and, if desired, use for emote replacement.
replaceEmotesWhether to replace emotes for this chat message. Defaults to false.

◆ ChatMessage() [2/2]

TwitchLib.Client.Models.ChatMessage.ChatMessage ( string  botUsername,
string  userId,
string  userName,
string  displayName,
string  colorHex,
Color  color,
EmoteSet  emoteSet,
string  message,
UserType  userType,
string  channel,
string  id,
bool  isSubscriber,
int  subscribedMonthCount,
string  roomId,
bool  isTurbo,
bool  isModerator,
bool  isMe,
bool  isBroadcaster,
bool  isVip,
bool  isPartner,
bool  isStaff,
Noisy  noisy,
string  rawIrcMessage,
string  emoteReplacedMessage,
List< KeyValuePair< string, string > >  badges,
CheerBadge  cheerBadge,
int  bits,
double  bitsInDollars 
)

Member Data Documentation

◆ _emoteCollection

readonly MessageEmoteCollection TwitchLib.Client.Models.ChatMessage._emoteCollection
protected

Property Documentation

◆ BadgeInfo

List<KeyValuePair<string, string> > TwitchLib.Client.Models.ChatMessage.BadgeInfo
get

Information associated with badges. Not all badges will be in this list. Use carefully.

◆ Bits

int TwitchLib.Client.Models.ChatMessage.Bits
get

If viewer sent bits in their message, total amount will be here.

◆ BitsInDollars

double TwitchLib.Client.Models.ChatMessage.BitsInDollars
get

Number of USD (United States Dollars) spent on bits.

◆ Channel

string TwitchLib.Client.Models.ChatMessage.Channel
get

Twitch channel message was sent from (useful for multi-channel bots).

◆ ChatReply

ChatReply TwitchLib.Client.Models.ChatMessage.ChatReply
get

◆ CheerBadge

CheerBadge TwitchLib.Client.Models.ChatMessage.CheerBadge
get

If a cheer badge exists, this property represents the raw value and color (more later). Can be null.

◆ CustomRewardId

string TwitchLib.Client.Models.ChatMessage.CustomRewardId
get

If a custom reward is present with the message, the ID will be set (null by default)

◆ EmoteReplacedMessage

string TwitchLib.Client.Models.ChatMessage.EmoteReplacedMessage
get

Text after emotes have been handled (if desired). Will be null if replaceEmotes is false.

◆ Id

string TwitchLib.Client.Models.ChatMessage.Id
get

Unique message identifier assigned by Twitch

◆ IsBroadcaster

bool TwitchLib.Client.Models.ChatMessage.IsBroadcaster
get

Chat message from broadcaster identifier flag

◆ IsFirstMessage

bool TwitchLib.Client.Models.ChatMessage.IsFirstMessage
get

Chat message is the first message, ever, from this user in this chat

◆ IsHighlighted

bool TwitchLib.Client.Models.ChatMessage.IsHighlighted
getset

Chat message is highlighted in chat via channel points

◆ IsMe

bool TwitchLib.Client.Models.ChatMessage.IsMe
get

Chat message /me identifier flag.

◆ IsModerator

bool TwitchLib.Client.Models.ChatMessage.IsModerator
get

Channel specific moderator status.

◆ IsPartner

bool TwitchLib.Client.Models.ChatMessage.IsPartner
get

Message is from a Twitch Partner

◆ IsSkippingSubMode

bool TwitchLib.Client.Models.ChatMessage.IsSkippingSubMode
getset

Message used channel points to skip sub mode

◆ IsStaff

bool TwitchLib.Client.Models.ChatMessage.IsStaff
get

Message is from a Twitch Staff member

◆ IsSubscriber

bool TwitchLib.Client.Models.ChatMessage.IsSubscriber
get

Channel specific subscriber status.

◆ IsVip

bool TwitchLib.Client.Models.ChatMessage.IsVip
get

Message is from channel VIP

◆ Message

string TwitchLib.Client.Models.ChatMessage.Message
get

Twitch chat message contents.

◆ Noisy

Noisy TwitchLib.Client.Models.ChatMessage.Noisy
get

Experimental property noisy determination by Twitch.

◆ RoomId

string TwitchLib.Client.Models.ChatMessage.RoomId
get

Unique identifier of chat room.

◆ SubscribedMonthCount

int TwitchLib.Client.Models.ChatMessage.SubscribedMonthCount
get

Number of months a person has been subbed.

◆ TmiSentTs

string TwitchLib.Client.Models.ChatMessage.TmiSentTs
get

Sent timestamp generated by TMI


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