/// <summary> /// Creates a new instance of the ChatUserNoticePacketModel class. /// </summary> /// <param name="packet">The Chat packet</param> public ChatUserNoticePacketModel(ChatRawPacketModel packet) : base(packet) { this.UserID = packet.GetTagLong("user-id"); this.Login = packet.GetTagString("login"); this.Moderator = packet.GetTagBool("mod"); this.MessageID = packet.GetTagString("id"); this.MessageTypeID = packet.GetTagString("msg-id"); this.SystemMessage = packet.GetTagString("system-msg"); this.RoomID = packet.GetTagString("room-id"); this.Emotes = packet.GetTagString("emotes"); this.SubCumulativeMonths = packet.GetTagInt("msg-param-cumulative-months"); this.SubPlan = packet.GetTagString("msg-param-sub-plan"); this.SubPlanDisplayName = packet.GetTagString("msg-param-sub-plan-name"); this.SubShareStreakMonths = packet.GetTagBool("msg-param-should-share-streak"); this.SubStreakMonths = packet.GetTagInt("msg-param-streak-months"); this.SubGiftSenderLogin = packet.GetTagString("msg-param-sender-login"); this.SubGiftSenderDisplayName = packet.GetTagString("msg-param-sender-name"); this.SubGiftMonths = packet.GetTagInt("msg-param-months"); this.SubGiftRecipientID = packet.GetTagString("msg-param-recipient-id"); this.SubGiftRecipientLogin = packet.GetTagString("msg-param-recipient-user-name"); this.SubGiftRecipientDisplayName = packet.GetTagString("msg-param-recipient-display-name"); this.SubPromoName = packet.GetTagString("msg-param-promo-name"); this.SubPromoTotalGifts = packet.GetTagInt("msg-param-promo-gift-total"); this.RaidUserLogin = packet.GetTagString("msg-param-login"); this.RaidUserDisplayName = packet.GetTagString("msg-param-displayName"); this.RaidViewerCount = packet.GetTagInt("msg-param-viewerCount"); this.RitualName = packet.GetTagString("msg-param-ritual-name"); this.BitsTierThreshold = packet.GetTagLong("msg-param-threshold"); this.Timestamp = packet.GetTagLong("tmi-sent-ts"); }
/// <summary> /// Creates a new instance of the ChatRoomStatePacketModel class. /// </summary> /// <param name="packet">The Chat packet</param> public ChatRoomStatePacketModel(ChatRawPacketModel packet) : base(packet) { this.EmoteOnly = packet.GetTagBool("emote-only"); this.FollowersOnly = packet.GetTagInt("followers-only"); this.R9K = packet.GetTagBool("r9k"); this.Slow = packet.GetTagInt("slow"); this.SubsOnly = packet.GetTagBool("subs-only"); }
/// <summary> /// Creates a new instance of the ChatUserStatePacketModel class. /// </summary> /// <param name="packet">The Chat packet</param> public ChatUserStatePacketModel(ChatRawPacketModel packet) : base(packet) { this.UserDisplayName = packet.GetTagString("display-name"); this.UserBadgeInfo = packet.GetTagString("badge-info"); this.UserBadges = packet.GetTagString("badges"); this.Moderator = packet.GetTagBool("mod"); this.Color = packet.GetTagString("color"); this.EmoteSets = packet.GetTagString("emote-sets"); }
/// <summary> /// Creates a new instance of the ChatMessagePacketModel class. /// </summary> /// <param name="packet">The Chat packet</param> public ChatMessagePacketModel(ChatRawPacketModel packet) : base(packet) { this.ID = packet.GetTagString("id"); this.Message = packet.Get1SkippedParameterText; this.UserID = packet.GetTagString("user-id"); this.UserLogin = packet.GetUserLogin; this.UserDisplayName = packet.GetTagString("display-name"); this.UserBadgeInfo = packet.GetTagString("badge-info"); this.UserBadges = packet.GetTagString("badges"); this.Moderator = packet.GetTagBool("mod"); this.Color = packet.GetTagString("color"); this.Emotes = packet.GetTagString("emotes"); this.RoomID = packet.GetTagString("room-id"); this.Bits = packet.GetTagString("bits"); this.Timestamp = packet.GetTagString("tmi-sent-ts"); }