Twitch SDK (Internal)
chattypes.h
Go to the documentation of this file.
1 
2 /********************************************************************************************
3 * Twitch Broadcasting SDK
4 *
5 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
6 * may not be copied or used except in accordance with the terms of that agreement
7 * Copyright (c) 2012-2016 Twitch Interactive, Inc.
8 *********************************************************************************************/
9 
10 #pragma once
11 
15 
16 #include <map>
17 #include <regex>
18 
19 
20 namespace ttv
21 {
22  namespace chat
23  {
24  using EmoticonId = uint32_t;
25  using EmoticonSetId = uint32_t;
26  using MessageId = uint32_t;
27 
28  struct FeatureFlags
29  {
30  FeatureFlags();
31 
32  static FeatureFlags All();
33  static FeatureFlags None();
34 
35  bool conversations:1;
36  };
37 
42  {
44 
45  static TokenizationOptions All();
46  static TokenizationOptions None();
47 
48  bool Any() const;
49 
50  bool emoticons:1;
51  bool mentions:1;
52  bool urls:1;
53  bool bits:1;
54  };
55 
56 
60  enum class ChatChannelState
61  {
63  Connecting,
64  Connected,
66  };
67 
68 
73  enum class ChatMode
74  {
75  Slow,
76  R9k,
77  EmotesOnly
78  };
79 
80 
84  struct ChatModeInfo
85  {
86  ChatModeInfo();
87 
89  bool r9kMode;
91  };
92 
93 
94  struct UserMode
95  {
96  UserMode();
97 
98  bool operator==(const UserMode& rhs) const;
99  bool operator!=(const UserMode& rhs) const;
100 
101  bool moderator:1;
102  bool broadcaster:1;
103  bool administrator:1;
104  bool staff:1;
105  bool system:1;
107  bool banned:1;
108  };
109 
110 
112  {
114 
115  bool operator==(const SubscriptionStatus& rhs) const;
116  bool operator!=(const SubscriptionStatus& rhs) const;
117 
118  bool subscriber:1;
119  bool turbo:1;
120  };
121 
122 
127  {
128  ChatUserInfo();
129 
130  bool operator==(const ChatUserInfo& rhs) const;
131  bool operator!=(const ChatUserInfo& rhs) const;
132 
133  std::string userName;
134  std::string displayName;
139  };
140 
141 
143  {
145 
146  bool operator==(const RestrictionReason& rhs) const;
147  bool operator!=(const RestrictionReason& rhs) const;
148 
149  bool anonymous:1;
151  bool slowMode:1;
152  bool timeout:1;
153  bool banned:1;
154  bool language:1;
155  };
156 
157 
162  {
163  std::string name;
164  std::string broadcasterLanguage;
166  };
167 
168 
170  {
172 
173  std::string chatLanguage;
174  uint32_t followersDuration;
175  uint32_t slowModeDuration;
176  bool emoteOnly;
179  bool slowMode;
180  bool r9k;
181  };
182 
183 
188  {
189  public:
190  enum class Type
191  {
192  Text,
193  Emoticon,
194  Mention,
195  Url,
196  Bits
197  };
198 
199  virtual std::unique_ptr<MessageToken> Clone() const = 0;
200  virtual Type GetType() const = 0;
201  };
202 
203  bool TokensEqual(const std::unique_ptr<MessageToken>& lhs, const std::unique_ptr<MessageToken>& rhs);
204 
208  struct TextToken : public Cloneable<MessageToken, TextToken>
209  {
210  TextToken() = default;
211  TextToken(const std::string& text);
212 
213  std::string text;
214 
215  virtual Type GetType() const override { return Type::Text; }
216  };
217 
218 
222  struct EmoticonToken : public Cloneable<MessageToken, EmoticonToken>
223  {
224  EmoticonToken();
225  EmoticonToken(const std::string& emoticonText, EmoticonId emoticonId);
226 
227  std::string emoticonText;
229 
230  virtual Type GetType() const override { return Type::Emoticon; }
231  };
232 
233 
237  struct MentionToken : public Cloneable<MessageToken, MentionToken>
238  {
239  MentionToken(const std::string& userName, const std::string& text, bool isLocalUser);
240 
241  std::string userName;
242  std::string text;
243  bool isLocalUser;
244 
245  virtual Type GetType() const override { return Type::Mention; }
246  };
247 
248 
252  struct UrlToken : public Cloneable<MessageToken, UrlToken>
253  {
254  UrlToken();
255  UrlToken(const std::string& url, bool hidden);
256 
257  std::string url;
258  bool hidden;
259 
260  virtual Type GetType() const override { return Type::Url; }
261  };
262 
263 
267  struct BitsToken : public Cloneable<MessageToken, BitsToken>
268  {
269  BitsToken();
270  BitsToken(const std::string& prefix, uint32_t numBits);
271 
272  std::string prefix;
273  uint32_t numBits;
274 
275  virtual Type GetType() const override { return Type::Bits; }
276  };
277 
278 
283  {
284  std::string name;
285  std::string version;
286  };
287 
288 
293  struct MessageInfo
294  {
295  MessageInfo();
296  MessageInfo(const MessageInfo& src);
297  MessageInfo& operator=(const MessageInfo& src);
298 
299  struct Flags
300  {
301  Flags();
302 
303  bool operator==(const Flags& rhs) const;
304  bool operator!=(const Flags& rhs) const;
305 
306  bool action:1;
307  bool notice:1;
308  bool ignored:1;
309  bool deleted:1;
310  bool containsBits:1;
311  };
312 
313  std::string userName;
314  std::string displayName;
315  std::vector<std::unique_ptr<MessageToken>> tokens;
316  std::vector<MessageBadge> badges;
322  uint32_t numBitsSent;
323  };
324 
325 
330  {
332  LiveChatMessage(const LiveChatMessage& src);
333  LiveChatMessage& operator=(const LiveChatMessage& src);
334 
336  std::string messageId;
337  };
338 
339 
344  {
345  WhisperMessage();
346  WhisperMessage(const WhisperMessage& src);
347  WhisperMessage& operator=(const WhisperMessage& src);
348 
350  std::string threadId;
352  };
353 
354 
359  {
361  std::string roomId;
362  std::string roomMessageId;
363  };
364 
365 
370  {
372  SubscriptionNotice(const SubscriptionNotice& source);
373  SubscriptionNotice& operator=(const SubscriptionNotice& source);
374 
375  enum class Type
376  {
377  Sub,
378  Resub,
379  SubGift,
380  Charity,
381  Unknown
382  };
383 
387  enum class Plan
388  {
389  Prime,
390  Sub1000,
391  Sub2000,
392  Sub3000,
393  Unknown
394  };
395 
396 
400  struct Recipient
401  {
402  Recipient();
403 
404  std::string userName;
405  std::string displayName;
407  };
408 
409  std::unique_ptr<MessageInfo> userMessage;
410  std::string systemMessage;
411  std::string planDisplayName;
412  std::string messageId;
414  uint32_t subMonthCount;
417  };
418 
419 
424  {
426  std::string systemMessage;
427  std::string messageId;
428  };
429 
430 
434  struct RaidNotice
435  {
436  RaidNotice();
437 
438  std::string systemMessage;
440  uint32_t viewerCount;
441  };
442 
443 
448  {
449  std::string systemMessage;
450  };
451 
452 
457  {
459 
460  uint32_t newLevel;
461  uint32_t previousLevel;
463  };
464 
465 
470  {
471  // displayName, userMode not filled out in message
473 
474  std::string channelName;
475  std::string context;
476 
478  uint32_t bitsUsed;
479  uint32_t totalBitsUsed;
480 
482  };
483 
488  {
489  BitsSentEvent();
490 
492  uint32_t userBitsBalance;
493  uint32_t channelBitsTotal;
494  };
495 
500  {
501  std::string displayName;
502  std::string userName;
504  };
505 
506 
511  {
512  // userMode not filled out in subNotice.userMessage
513  // systemMessage not filled out in subNotice
515 
516  std::string userName;
517  std::string displayName;
518  std::string channelName;
522  };
523 
524 
528  struct ThreadData
529  {
530  ThreadData();
531  ThreadData(const ThreadData& src);
532  ThreadData& operator=(const ThreadData& src);
533 
534  std::string threadId;
535  std::vector<ChatUserInfo> participants;
536  std::unique_ptr<WhisperMessage> lastMessage;
542  bool archived;
543  bool muted;
544  };
545 
546 
547  enum class ChatReplayState
548  {
549  Paused,
550  Playing,
551  Buffering,
553  };
554 
555 
560  {
561  ReplayMessage();
562 
564  std::string messageId;
565  bool deleted;
566  };
567 
568 
572  struct BadgeImage
573  {
574  BadgeImage();
575 
576  std::string url;
577  float scale;
578  };
579 
580 
585  {
586  BadgeVersion();
587 
588  enum class Action
589  {
590  None,
591  SubscribeToChannel,
592  VisitUrl,
593  Turbo
594  };
595 
596  std::string name;
597  std::string title;
598  std::string description;
599  std::string clickUrl;
600  std::vector<BadgeImage> images;
602 
609  TTV_ErrorCode FindImage(float scale, BadgeImage& result) const;
610  };
611 
612 
616  struct Badge
617  {
618  std::string name;
619  std::map<std::string, BadgeVersion> versions;
620  };
621 
622 
626  struct BadgeSet
627  {
628  std::string language;
629  std::map<std::string, Badge> badges;
630 
637  TTV_ErrorCode FindBadge(const MessageBadge& badge, BadgeVersion& result) const;
638 
645  TTV_ErrorCode FindBadgeImage(const MessageBadge& badge, float scale, BadgeImage& result) const;
646  };
647 
648 
652  struct Emoticon
653  {
654  Emoticon();
655  bool operator==(const Emoticon& rhs) const;
656 
657  std::regex regex;
658  std::string match;
660  bool isRegex;
661  };
662 
663 
667  struct EmoticonSet
668  {
669  EmoticonSet();
670  bool operator==(const EmoticonSet& rhs) const;
671  bool operator<(const EmoticonSet& rhs) const;
672 
673  std::vector<Emoticon> emoticons;
675  };
676 
677 
682  {
683  public:
684  struct BitsImage
685  {
686  BitsImage();
687 
688  std::string url;
689  std::string background;
690  std::string animationState;
691  float scale;
692  };
693 
694  struct ImageTier
695  {
696  ImageTier();
697 
698  std::vector<BitsImage> images;
699  uint32_t minBits;
701  };
702 
703  struct Action
704  {
705  Action();
706 
707  enum class Type
708  {
709  GlobalFirstParty,
710  GlobalThirdParty,
711  ChannelCustom,
712  Unknown
713  };
714 
715  std::string prefix;
716  std::vector<ImageTier> tiers;
717  std::vector<float> imageScales;
718  std::vector<std::string> imageBackgrounds;
719  std::vector<std::string> imageAnimationStates;
720  uint32_t priority;
722  };
723 
724  public:
725  BitsConfiguration(const std::vector<Action>& actions, ChannelId channelId);
727 
734  TTV_ErrorCode GetBitsImageUrl(const std::string& prefix, uint32_t numBits, const std::string& animation, const std::string& background, float scale, std::string& url, Color& color) const;
735 
736  const std::vector<Action>& GetActions() const;
737  ChannelId GetChannelId() const;
738 
739  private:
740  std::vector<Action> mActions;
742  };
743 
744 
746  {
748 
749  bool operator==(const UnreadThreadCounts&) const;
750  bool operator!=(const UnreadThreadCounts&) const;
751 
755  };
756 
757 
758  struct UserList
759  {
760  UserList();
761 
762  std::vector<std::string> moderators;
763  std::vector<std::string> globalModerators;
764  std::vector<std::string> staff;
765  std::vector<std::string> admins;
766  std::vector<std::string> viewers;
767 
768  uint32_t totalUserCount;
769  };
770 
771 
775  enum class RoomRole
776  {
777  Unknown,
778  Everyone,
779  Subscriber,
780  Moderator
781  };
782 
783 
788  {
790 
793  bool moderate;
794  };
795 
796 
801  {
802  ChatRoomView();
803 
807  bool isMuted;
808  bool isArchived;
809  bool isUnread;
810  };
811 
812 
817  {
818  ChatRoomInfo();
819 
823  std::string id;
824  std::string name;
825  std::string topic;
828  };
829 
830 
835  {
836  RoomMentionInfo();
837 
838  std::string roomOwnerName;
839  std::string roomOwnerLogin;
840  std::string senderName;
841  std::string roomId;
842  std::string roomName;
843  std::string messageId;
847  };
848 
849 
853  struct RaidStatus
854  {
855  RaidStatus();
856 
857  bool operator==(const RaidStatus& other) const;
858  bool operator!=(const RaidStatus& other) const;
859 
860  std::string raidId;
867  uint32_t numUsersInRaid;
868  bool joined;
869  };
870 
875  {
877 
878  std::string targetChannelName;
881  };
882  }
883 }
Type
Definition: chattypes.h:190
uint32_t UserId
Definition: coretypes.h:22
bool r9kMode
Whether the room is in r9k mode.
Definition: chattypes.h:89
MessageInfo userMessage
Message the user provided when they completed their first chatter ritual.
Definition: chattypes.h:425
std::string targetChannelName
The name of the channel now being hosted. Will be empty if we are now no longer hosting.
Definition: chattypes.h:878
MessageId lastReadMessageId
The id of the last read message.
Definition: chattypes.h:538
bool administrator
An admin.
Definition: chattypes.h:103
ChatReplayState
Definition: chattypes.h:547
Definition: chattypes.h:528
Definition: chattypes.h:559
bool moderator
A moderator.
Definition: chattypes.h:101
UserId senderId
Definition: chattypes.h:845
Definition: chattypes.h:329
SubscriptionStatus subscriptionStatus
The user&#39;s subscriptions in the current context.
Definition: chattypes.h:138
Definition: chattypes.h:667
uint32_t priority
Lower priority should show up first (0 will show up first)
Definition: chattypes.h:720
std::string roomOwnerLogin
Definition: chattypes.h:839
SubscriptionNotice subNotice
Details of the subscription.
Definition: chattypes.h:514
bool notice
Whether or not the message is a system notice.
Definition: chattypes.h:307
Definition: chattypes.h:208
std::vector< std::string > imageAnimationStates
Definition: chattypes.h:719
Definition: chattypes.h:94
bool joined
Whether or not the local user has joined the raid.
Definition: chattypes.h:868
std::vector< std::string > moderators
Definition: chattypes.h:762
Definition: chattypes.h:161
bool muted
Definition: chattypes.h:543
EmoticonSetId emoticonSetId
Definition: chattypes.h:674
Definition: chattypes.h:237
LiveChatMessage()
Definition: chattypes.h:331
Definition: chattypes.h:369
Definition: chattypes.h:358
Definition: chattypes.h:616
uint32_t EmoticonId
Definition: chattypes.h:24
std::string url
The url.
Definition: chattypes.h:257
RoomRole
Definition: chattypes.h:775
bool sendMessages
The user can send messages in the chat room.
Definition: chattypes.h:792
bool r9k
Whether chat is in r9k mode.
Definition: chattypes.h:180
bool archived
Definition: chattypes.h:542
Definition: chattypes.h:222
MessageInfo messageInfo
The common information about the message.
Definition: chattypes.h:335
std::string name
Corresponds to Badge::name.
Definition: chattypes.h:284
std::vector< ChatUserInfo > participants
The list of participants.
Definition: chattypes.h:535
ChatModeInfo modes
Information on what chat modes the room is in.
Definition: chattypes.h:822
bool isArchived
If the user has the room archived.
Definition: chattypes.h:808
ChatMode
Definition: chattypes.h:73
std::string prefix
Definition: chattypes.h:715
ChannelId channelId
Channel ID of the channel recieving bits from the user.
Definition: chattypes.h:491
std::string broadcasterLanguage
The active broadcaster language code. Empty if there is no language filter enabled.
Definition: chattypes.h:164
bool staff
A member of Twitch.
Definition: chattypes.h:104
uint32_t slowModeDuration
0 if slow mode is off, otherwise, represents how long the user must wait between sending messsages...
Definition: chattypes.h:175
uint32_t unreadMessageCount
Definition: chattypes.h:753
float scale
Definition: chattypes.h:691
Definition: chattypes.h:499
Definition: chattypes.h:299
Definition: coretypes.h:32
Definition: chattypes.h:510
uint32_t MessageId
Definition: chattypes.h:26
Definition: chattypes.h:758
Definition: chattypes.h:267
uint32_t bitsUsed
Number of bits used.
Definition: chattypes.h:478
std::vector< std::string > admins
Definition: chattypes.h:765
std::vector< std::unique_ptr< MessageToken > > tokens
The array of message tokens.
Definition: chattypes.h:315
uint32_t userBitsBalance
Bits balance of the user cheering.
Definition: chattypes.h:492
std::string text
Definition: chattypes.h:213
bool banned
The user has been permanently banned. Expect TTV_CHAT_RESTRICTION_REASON_NONE if a moderator ever unb...
Definition: chattypes.h:153
std::string language
The language of the badge details.
Definition: chattypes.h:628
Definition: chattypes.h:169
UserId userId
User ID of the person who subscribed to the channel.
Definition: chattypes.h:519
RoomRole minimumAllowedRole
The minimum allowed role of the channel, anyone this role or higher can access the channel...
Definition: chattypes.h:826
uint32_t minBits
Definition: chattypes.h:699
Type type
Definition: chattypes.h:721
std::string userName
Username of the person who followed the channel.
Definition: chattypes.h:502
std::string messageId
The id of the first time chatter notice.
Definition: chattypes.h:427
uint32_t numBitsSent
The total number of bits sent via this message.
Definition: chattypes.h:322
Action
Definition: chattypes.h:588
ChatRoomPermissions permissions
What actions the user is allowed to do in the room.
Definition: chattypes.h:806
uint32_t Timestamp
Definition: coretypes.h:27
std::string userName
Definition: chattypes.h:404
Type
Definition: chattypes.h:707
Definition: chattypes.h:853
bool subscribersOnly
Whether chat is in subscribers-only mode.
Definition: chattypes.h:178
Definition: chattypes.h:572
bool subscribersOnly
The channel is in subscribers only mode.
Definition: chattypes.h:150
std::string userName
Login name of the person who subscribed to the channel.
Definition: chattypes.h:516
MessageId lastMessageId
The last message id obtained from the backed. This could be ahead of what is stored locally...
Definition: chattypes.h:537
std::string channelName
Name of the channel subscribed to.
Definition: chattypes.h:518
Definition: chattypes.h:142
Timestamp lastReadAt
The last time the user read a message in the room.
Definition: chattypes.h:804
bool language
The user does not speak the active broadcaster language and has not opted in yet. ...
Definition: chattypes.h:154
Definition: chattypes.h:800
std::string background
Definition: chattypes.h:689
bool mentions
Find when tokenizing.
Definition: chattypes.h:51
bool readMessages
The user can read messages in the chat room.
Definition: chattypes.h:791
bool turbo
A Twitch Turbo account.
Definition: chattypes.h:119
uint32_t newLevel
User&#39;s new badge level.
Definition: chattypes.h:460
std::string displayName
Definition: chattypes.h:405
Definition: chattypes.h:626
uint32_t channelBitsTotal
Total amount of bits cheered by the user in the channel.
Definition: chattypes.h:493
Definition: chattypes.h:293
std::vector< MessageBadge > badges
The array of badges.
Definition: chattypes.h:316
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
bool system
The Twitch system.
Definition: chattypes.h:105
std::string threadId
The unique thread id.
Definition: chattypes.h:534
virtual Type GetType() const override
Definition: chattypes.h:245
uint32_t totalBitsUsed
All-time total number of bits used on this channel by the specified user.
Definition: chattypes.h:479
std::string channelName
Name of the channel on which bits were used.
Definition: chattypes.h:474
bool urls
Find URLs when tokenizing.
Definition: chattypes.h:52
Plan plan
The plan/tier of the user&#39;s subscription.
Definition: chattypes.h:416
ChannelId previousChannelId
The channel id of the channel previous hosted. Will be 0 if we were not hosting before.
Definition: chattypes.h:880
uint32_t slowModeDurationSeconds
The number of seconds a user has to wait before sending another message. Value of 0 if not in slow mo...
Definition: chattypes.h:88
std::vector< ImageTier > tiers
Definition: chattypes.h:716
std::string chatLanguage
Empty string if no restriction, otherwise, value is the language users in chat must talk in...
Definition: chattypes.h:173
std::vector< Action > mActions
Holds the individual bits actions that can be performed.
Definition: chattypes.h:740
Flags flags
Any additional details about the message.
Definition: chattypes.h:318
Definition: chattypes.h:652
Timestamp timestamp
Time when subscribed event occured.
Definition: chattypes.h:521
std::string topic
Topic of the chatroom.
Definition: chattypes.h:825
bool slowMode
The channel is in slow mode and messages are being paced. Expect TTV_CHAT_RESTRICTION_REASON_NONE whe...
Definition: chattypes.h:151
std::string raidId
The unique id for the raid.
Definition: chattypes.h:860
Definition: chattypes.h:681
std::string emoticonText
The raw text which was transformed into the image.
Definition: chattypes.h:227
std::string systemMessage
Message generated by the system itself accompanying the user message.
Definition: chattypes.h:410
std::string match
Definition: chattypes.h:658
bool deleted
True if message was deleted.
Definition: chattypes.h:565
std::string planDisplayName
The human readable name of the sub plan.
Definition: chattypes.h:411
std::string roomMessageId
The message id for the room.
Definition: chattypes.h:362
bool banned
Definition: chattypes.h:107
std::string prefix
The prefix of the bits token (i.e. "cheer")
Definition: chattypes.h:272
uint32_t unreadMentionCount
The number of unread mentions in the room.
Definition: chattypes.h:805
UserId userId
The ID of the user, if available. If the userId is not available, this will be set to 0...
Definition: chattypes.h:136
Color nameColorARGB
The current ARGB color of the user&#39;s name text.
Definition: chattypes.h:319
bool followersOnly
Whether chat is in followers-only mode.
Definition: chattypes.h:177
ChannelId roomOwnerId
Definition: chattypes.h:844
UserInfo owner
Owner of the chatroom.
Definition: chattypes.h:820
Definition: chattypes.h:745
std::string roomId
Definition: chattypes.h:841
Definition: chattypes.h:684
Definition: chattypes.h:874
uint32_t unreadThreadCount
Definition: chattypes.h:752
Definition: chattypes.h:487
Definition: chattypes.h:84
bool broadcaster
The broadcaster.
Definition: chattypes.h:102
bool isRegex
Definition: chattypes.h:660
bool hidden
Whether or not the URL token should be hidden by the client.
Definition: chattypes.h:258
bool emoticons
Find emoticons when tokenizing.
Definition: chattypes.h:50
uint32_t remainingSecondsDuration
The number of seconds remaining before the raid happens.
Definition: chattypes.h:866
bool bits
Find Bits(TM) tokens when tokenizing.
Definition: chattypes.h:53
MessageInfo messageInfo
The information about the message.
Definition: chattypes.h:360
Definition: chattypes.h:703
UserId userId
User Id of the person who followed the channel.
Definition: chattypes.h:503
Timestamp raidTime
The time that the raid will occur.
Definition: chattypes.h:865
std::unique_ptr< MessageInfo > userMessage
Message the user provided when sharing their subscription.
Definition: chattypes.h:409
std::string text
The original mention text used in the message.
Definition: chattypes.h:242
MessageInfo message
Chat message sent with the cheer.
Definition: chattypes.h:472
std::map< std::string, Badge > badges
The badges in the badge set, keyed by badge name.
Definition: chattypes.h:629
UserId userId
Definition: chattypes.h:406
bool isMuted
If the user has muted the room.
Definition: chattypes.h:807
std::string clickUrl
The url to visit if clickAction is "visit_url".
Definition: chattypes.h:599
std::vector< BitsImage > images
Definition: chattypes.h:698
bool isLocalUser
True if mention is for the current local user.
Definition: chattypes.h:243
std::string url
The image url.
Definition: chattypes.h:576
Type
Definition: chattypes.h:375
BadgeEntitlement badge
Information about the user&#39;s new badge level, if the user reached a new badge level with this cheer...
Definition: chattypes.h:481
bool moderate
The user can moderate the chat room.
Definition: chattypes.h:793
Definition: chattypes.h:187
std::map< std::string, BadgeVersion > versions
The versions available for rendering, keyed by version name.
Definition: chattypes.h:619
uint32_t subMonthCount
How many consecutive months the user has been subbed.
Definition: chattypes.h:414
std::string context
Event type associated with this use of bits.
Definition: chattypes.h:475
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
bool emotesOnlyMode
Whether the room is in emotes-only mode.
Definition: chattypes.h:90
std::string displayName
The UTF-8 encoded displayed name. Currently restricted to the ASCII subset.
Definition: chattypes.h:134
Definition: chattypes.h:469
std::string senderName
Definition: chattypes.h:840
std::string userName
The mentioned user.
Definition: chattypes.h:241
UserMode userMode
The modes of the user who sent the message.
Definition: chattypes.h:317
Timestamp lastUpdatedTimestamp
Unix timestamp for the last time the thread was updated on the server.
Definition: chattypes.h:539
std::string displayName
The UTF-8 encoded displayed name.
Definition: chattypes.h:314
bool containsBits
Whether or not the message indicates the user has sent bits.
Definition: chattypes.h:310
ChatChannelState
Definition: chattypes.h:60
std::vector< BadgeImage > images
Definition: chattypes.h:600
Definition: chattypes.h:252
ChannelId channelId
User ID of the channel subscribed to.
Definition: chattypes.h:520
EmoticonId emoticonId
The emoticon id.
Definition: chattypes.h:228
float scale
The scale factor of the image.
Definition: chattypes.h:577
std::string systemMessage
Message generated by the system itself accompanying the user message.
Definition: chattypes.h:426
uint32_t EmoticonSetId
Definition: chattypes.h:25
std::vector< std::string > viewers
Definition: chattypes.h:766
bool action
Whether or not the message is an action. If true, it should be displayed entirely in the name text co...
Definition: chattypes.h:306
Definition: chattypes.h:787
uint32_t viewerCount
How many users are part of the raid.
Definition: chattypes.h:440
uint32_t numUsersInRaid
The number of users who have opted into the raid.
Definition: chattypes.h:867
std::string name
Definition: chattypes.h:596
std::string description
Definition: chattypes.h:598
uint32_t totalUserCount
Definition: chattypes.h:768
bool emoteOnly
Whether chat is in emote-only mode.
Definition: chattypes.h:176
Definition: coreutilities.h:49
bool TokensEqual(const std::unique_ptr< MessageToken > &lhs, const std::unique_ptr< MessageToken > &rhs)
std::unique_ptr< WhisperMessage > lastMessage
This might be null if the thread hasn&#39;t had any activity yet.
Definition: chattypes.h:536
std::string id
Unique id of the chatroom.
Definition: chattypes.h:823
bool exhaustive
Definition: chattypes.h:754
EmoticonId emoticonId
Definition: chattypes.h:659
bool slowMode
Whether chat is in slow mode.
Definition: chattypes.h:179
std::string name
The unique name of the badge.
Definition: chattypes.h:618
UserId sourceUserId
The user&#39;s channel which users would transition from.
Definition: chattypes.h:862
std::string animationState
Definition: chattypes.h:690
Definition: chattypes.h:282
MessageInfo messageInfo
The common information about the message.
Definition: chattypes.h:349
std::vector< Emoticon > emoticons
Definition: chattypes.h:673
std::string roomName
Definition: chattypes.h:842
bool anonymous
Logged in anonymously so can&#39;t chat.
Definition: chattypes.h:149
MessageInfo messageInfo
The common information about the message.
Definition: chattypes.h:563
bool globalModerator
A global moderator.
Definition: chattypes.h:106
bool subscriber
A subscriber in the current channel.
Definition: chattypes.h:118
ChatRoomView view
User-specific information for the room.
Definition: chattypes.h:821
std::string messageId
The id of the replay message.
Definition: chattypes.h:564
bool timeout
The user has been temporarily banned for an amount of time. Expect TTV_CHAT_RESTRICTION_REASON_NONE w...
Definition: chattypes.h:152
std::regex regex
Definition: chattypes.h:657
UserId userId
The unique user id.
Definition: chattypes.h:321
std::string url
Definition: chattypes.h:688
Color color
Definition: chattypes.h:700
static FeatureFlags All()
std::string name
Name of the chatroom.
Definition: chattypes.h:824
std::vector< std::string > globalModerators
Definition: chattypes.h:763
Type type
Whether this is a sub, resub, subgift, or charity.
Definition: chattypes.h:415
virtual Type GetType() const override
Definition: chattypes.h:260
bool deleted
Whether or not the message has been deleted.
Definition: chattypes.h:309
uint32_t followersDuration
If followersOnly is true, represents how long the user must have been following for before being able...
Definition: chattypes.h:174
Timestamp sentAt
Definition: chattypes.h:846
virtual Type GetType() const override
Definition: chattypes.h:230
Color nameColorARGB
The current ARGB color of the user&#39;s name text.
Definition: chattypes.h:135
virtual Type GetType() const override
Definition: chattypes.h:215
std::string threadId
The UTF-8 encoded id for the thread the whisper is received on.
Definition: chattypes.h:350
bool isUnread
If the user has unread messages for the room.
Definition: chattypes.h:809
Definition: chattypes.h:28
std::vector< float > imageScales
Definition: chattypes.h:717
Timestamp timestamp
The time the message was originally received.
Definition: chattypes.h:320
Definition: chattypes.h:584
std::string roomOwnerName
Definition: chattypes.h:838
uint32_t ChannelId
Definition: coretypes.h:23
std::string messageId
Definition: chattypes.h:843
Plan
Definition: chattypes.h:387
Definition: chattypes.h:816
Definition: chattypes.h:447
std::string messageId
The message id associated with a live chat message.
Definition: chattypes.h:336
Definition: chattypes.h:126
UserInfo raidingUserInfo
The user info for the raiding channel.
Definition: chattypes.h:439
Definition: chattypes.h:343
std::string systemMessage
Message generated by the system accompanying the unraid.
Definition: chattypes.h:449
bool ignored
Whether or not the message was sent by a blocked user.
Definition: chattypes.h:308
UserMode userMode
The mode which controls priviledges in a particular chat room.
Definition: chattypes.h:137
std::string messageId
The id of the subscription notice message (only for usernotices).
Definition: chattypes.h:412
bool conversations
Conversations support.
Definition: chattypes.h:35
Timestamp lastFetchedTimestamp
Unix timestamp for the last time the thread was fetched from the server.
Definition: chattypes.h:540
bool isNewBadgeLevel
Marked true if user has reached a new badge level. The fields above are only relevant if this is true...
Definition: chattypes.h:462
static FeatureFlags None()
Definition: chattypes.h:41
std::string userName
The UTF-8 encoded user name.
Definition: chattypes.h:313
std::string roomId
The room id the message is being sent to.
Definition: chattypes.h:361
Definition: chattypes.h:434
uint32_t Color
Definition: coretypes.h:28
bool isPreviewable
Determines if others can preview the room (public/private)
Definition: chattypes.h:827
Definition: chattypes.h:456
std::string displayName
Display name of the person who followed the channel.
Definition: chattypes.h:501
std::string displayName
Display name of the person who subscribed to the channel.
Definition: chattypes.h:517
std::string name
The UTF-8 encoded name of the channel. Currently restricted to the ASCII subset.
Definition: chattypes.h:163
Timestamp announceTime
The time that the raid was created at.
Definition: chattypes.h:864
std::string version
Corresponds to BadgeVersion::name.
Definition: chattypes.h:285
MessageId messageId
The id of the whisper message.
Definition: chattypes.h:351
Recipient recipient
The recipient of a subscription (only for subgift usernotices).
Definition: chattypes.h:413
Definition: chattypes.h:423
uint32_t previousLevel
User&#39;s previous badge level.
Definition: chattypes.h:461
ChannelId targetChannelId
The channel id of the channel now being hosted. Will be 0 if we are now no longer hosting...
Definition: chattypes.h:879
std::string systemMessage
Message generated by the system accompanying the raid.
Definition: chattypes.h:438
Definition: chattypes.h:111
std::string title
Definition: chattypes.h:597
UserId creatorUserId
The user&#39;s id who created the raid - can be the broadcaster, moderator of the source channel...
Definition: chattypes.h:861
Definition: chattypes.h:834
Definition: chattypes.h:400
UserId targetUserId
The user&#39;s channel users would transition to.
Definition: chattypes.h:863
std::string userName
Definition: chattypes.h:133
uint32_t numUnreadMessages
Definition: chattypes.h:541
virtual Type GetType() const override
Definition: chattypes.h:275
Definition: chattypes.h:694
ChannelId mChannelId
A ChannelId of 0 implies a global bits configuration.
Definition: chattypes.h:741
std::vector< std::string > staff
Definition: chattypes.h:764
uint32_t numBits
The number of bits for the token.
Definition: chattypes.h:273
Action clickAction
The action to take when a user invokes the badge via a click.
Definition: chattypes.h:601
RestrictionReason localUserRestriction
The active restriction for the local user.
Definition: chattypes.h:165
std::vector< std::string > imageBackgrounds
Definition: chattypes.h:718
ChannelId channelId
User ID of the channel on which bits were used.
Definition: chattypes.h:477