From c1fda4c609b7b91ec8720e20af4dd080ea577bd8 Mon Sep 17 00:00:00 2001 From: AoshiW <48525283+AoshiW@users.noreply.github.com> Date: Mon, 30 Oct 2023 01:34:57 +0100 Subject: [PATCH] fix typos (#253) Co-authored-by: AoshiW --- TwitchLib.Client.Models/Announcement.cs | 7 ++++--- TwitchLib.Client.Models/AnonGiftPaidUpgrade.cs | 7 ++++--- TwitchLib.Client.Models/BitsBadgeTier.cs | 9 +++++---- TwitchLib.Client.Models/ChannelState.cs | 2 +- TwitchLib.Client.Models/ChatMessage.cs | 2 +- TwitchLib.Client.Models/CommunityPayForward.cs | 7 ++++--- TwitchLib.Client.Models/CommunitySubscription.cs | 4 ++-- TwitchLib.Client.Models/ContinuedGiftedSubscription.cs | 7 ++++--- TwitchLib.Client.Models/GiftedSubscription.cs | 9 +++++---- TwitchLib.Client.Models/Internal/Tags.cs | 2 +- TwitchLib.Client.Models/PrimePaidSubscriber.cs | 7 ++++--- TwitchLib.Client.Models/RaidNotification.cs | 7 ++++--- TwitchLib.Client.Models/ReSubscriber.cs | 7 ++++--- TwitchLib.Client.Models/Ritual.cs | 7 ++++--- TwitchLib.Client.Models/StandardPayForward.cs | 9 +++++---- TwitchLib.Client.Models/Subscriber.cs | 7 ++++--- TwitchLib.Client.Models/UnraidNotification.cs | 7 ++++--- TwitchLib.Client.Models/UserState.cs | 2 +- TwitchLib.Client.Models/UserTimeout.cs | 6 +++--- TwitchLib.Client.Models/WhisperMessage.cs | 2 +- 20 files changed, 65 insertions(+), 52 deletions(-) diff --git a/TwitchLib.Client.Models/Announcement.cs b/TwitchLib.Client.Models/Announcement.cs index e531ff04..36229797 100644 --- a/TwitchLib.Client.Models/Announcement.cs +++ b/TwitchLib.Client.Models/Announcement.cs @@ -28,7 +28,7 @@ public Announcement( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -47,12 +47,13 @@ public Announcement( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/AnonGiftPaidUpgrade.cs b/TwitchLib.Client.Models/AnonGiftPaidUpgrade.cs index 6a6c1c63..e4f1257d 100644 --- a/TwitchLib.Client.Models/AnonGiftPaidUpgrade.cs +++ b/TwitchLib.Client.Models/AnonGiftPaidUpgrade.cs @@ -29,7 +29,7 @@ public AnonGiftPaidUpgrade( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -48,12 +48,13 @@ public AnonGiftPaidUpgrade( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/BitsBadgeTier.cs b/TwitchLib.Client.Models/BitsBadgeTier.cs index c926c509..7354f76d 100644 --- a/TwitchLib.Client.Models/BitsBadgeTier.cs +++ b/TwitchLib.Client.Models/BitsBadgeTier.cs @@ -24,7 +24,7 @@ public BitsBadgeTier( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -42,12 +42,13 @@ public BitsBadgeTier( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, @@ -70,4 +71,4 @@ protected override bool TrySet(KeyValuePair tag) } return true; } -} \ No newline at end of file +} diff --git a/TwitchLib.Client.Models/ChannelState.cs b/TwitchLib.Client.Models/ChannelState.cs index 1135b765..7c8cf616 100644 --- a/TwitchLib.Client.Models/ChannelState.cs +++ b/TwitchLib.Client.Models/ChannelState.cs @@ -81,7 +81,7 @@ public ChannelState(IrcMessage ircMessage) Mercury = TagHelper.ToBool(tagValue); break; default: - (UndocumentedTags = new()).Add(tag.Key, tag.Value); + (UndocumentedTags ??= new()).Add(tag.Key, tag.Value); break; } } diff --git a/TwitchLib.Client.Models/ChatMessage.cs b/TwitchLib.Client.Models/ChatMessage.cs index 0b7f4a88..6b5c66c7 100644 --- a/TwitchLib.Client.Models/ChatMessage.cs +++ b/TwitchLib.Client.Models/ChatMessage.cs @@ -231,7 +231,7 @@ public ChatMessage( break; default: if (!(ChatReply.TrySetTag(ref _chatReply, tag) || HypeChat.TrySetTag(ref _hypeChat, tag))) - (UndocumentedTags = new()).Add(tag.Key, tag.Value); + (UndocumentedTags ??= new()).Add(tag.Key, tag.Value); break; } } diff --git a/TwitchLib.Client.Models/CommunityPayForward.cs b/TwitchLib.Client.Models/CommunityPayForward.cs index 9a79b771..4603b3e7 100644 --- a/TwitchLib.Client.Models/CommunityPayForward.cs +++ b/TwitchLib.Client.Models/CommunityPayForward.cs @@ -27,7 +27,7 @@ public CommunityPayForward( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -48,12 +48,13 @@ public CommunityPayForward( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/CommunitySubscription.cs b/TwitchLib.Client.Models/CommunitySubscription.cs index 0a6addcc..210df0fc 100644 --- a/TwitchLib.Client.Models/CommunitySubscription.cs +++ b/TwitchLib.Client.Models/CommunitySubscription.cs @@ -40,7 +40,7 @@ public CommunitySubscription( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -63,7 +63,7 @@ public CommunitySubscription( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, diff --git a/TwitchLib.Client.Models/ContinuedGiftedSubscription.cs b/TwitchLib.Client.Models/ContinuedGiftedSubscription.cs index 468e486e..852d53fb 100644 --- a/TwitchLib.Client.Models/ContinuedGiftedSubscription.cs +++ b/TwitchLib.Client.Models/ContinuedGiftedSubscription.cs @@ -41,7 +41,7 @@ public ContinuedGiftedSubscription( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -62,12 +62,13 @@ public ContinuedGiftedSubscription( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/GiftedSubscription.cs b/TwitchLib.Client.Models/GiftedSubscription.cs index 9b26f2f3..a69a7dcb 100644 --- a/TwitchLib.Client.Models/GiftedSubscription.cs +++ b/TwitchLib.Client.Models/GiftedSubscription.cs @@ -64,7 +64,7 @@ public GiftedSubscription( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -90,12 +90,13 @@ public GiftedSubscription( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, @@ -124,7 +125,7 @@ protected override bool TrySet(KeyValuePair tag) case Tags.MsgParamMonths: MsgParamMonths = tag.Value; break; - case Tags.MsgParamRecipientDisplayname: + case Tags.MsgParamRecipientDisplayName: MsgParamRecipientDisplayName = tag.Value; break; case Tags.MsgParamRecipientId: diff --git a/TwitchLib.Client.Models/Internal/Tags.cs b/TwitchLib.Client.Models/Internal/Tags.cs index 49cfccd7..9c10f4a8 100644 --- a/TwitchLib.Client.Models/Internal/Tags.cs +++ b/TwitchLib.Client.Models/Internal/Tags.cs @@ -47,7 +47,7 @@ public static class Tags public const string MsgParamSubPlan = "msg-param-sub-plan"; // Sent only on sub, resub, subgift, anonsubgift public const string MsgParamSubPlanName = "msg-param-sub-plan-name"; // Sent only on sub, resub, subgift, anonsubgift public const string MsgParamViewerCount = "msg-param-viewerCount"; // Sent only on raid - public const string MsgParamRecipientDisplayname = "msg-param-recipient-display-name"; // Sent only on subgift, anonsubgift + public const string MsgParamRecipientDisplayName = "msg-param-recipient-display-name"; // Sent only on subgift, anonsubgift public const string MsgParamRecipientId = "msg-param-recipient-id"; // Sent only on subgift, anonsubgift public const string MsgParamRecipientUsername = "msg-param-recipient-user-name"; // Sent only on subgift, anonsubgift public const string MsgParamRitualName = "msg-param-ritual-name"; // Sent only on ritual diff --git a/TwitchLib.Client.Models/PrimePaidSubscriber.cs b/TwitchLib.Client.Models/PrimePaidSubscriber.cs index 3e942d27..6df67b28 100644 --- a/TwitchLib.Client.Models/PrimePaidSubscriber.cs +++ b/TwitchLib.Client.Models/PrimePaidSubscriber.cs @@ -31,7 +31,7 @@ public PrimePaidSubscriber( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -50,12 +50,13 @@ public PrimePaidSubscriber( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/RaidNotification.cs b/TwitchLib.Client.Models/RaidNotification.cs index 3c9725b2..dd5dbdb7 100644 --- a/TwitchLib.Client.Models/RaidNotification.cs +++ b/TwitchLib.Client.Models/RaidNotification.cs @@ -34,7 +34,7 @@ public RaidNotification( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -54,12 +54,13 @@ public RaidNotification( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/ReSubscriber.cs b/TwitchLib.Client.Models/ReSubscriber.cs index c3e98035..b1af37ae 100644 --- a/TwitchLib.Client.Models/ReSubscriber.cs +++ b/TwitchLib.Client.Models/ReSubscriber.cs @@ -47,7 +47,7 @@ public ReSubscriber( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -70,12 +70,13 @@ public ReSubscriber( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/Ritual.cs b/TwitchLib.Client.Models/Ritual.cs index aefbf4d0..9e00e254 100644 --- a/TwitchLib.Client.Models/Ritual.cs +++ b/TwitchLib.Client.Models/Ritual.cs @@ -27,7 +27,7 @@ public Ritual( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -46,12 +46,13 @@ public Ritual( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/StandardPayForward.cs b/TwitchLib.Client.Models/StandardPayForward.cs index a2c9db4d..e3f0529b 100644 --- a/TwitchLib.Client.Models/StandardPayForward.cs +++ b/TwitchLib.Client.Models/StandardPayForward.cs @@ -33,7 +33,7 @@ public StandardPayForward( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -57,12 +57,13 @@ public StandardPayForward( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, @@ -97,7 +98,7 @@ protected override bool TrySet(KeyValuePair tag) case Tags.MsgParamPriorGifterUserName: MsgParamPriorGifterUserName = tag.Value; break; - case Tags.MsgParamRecipientDisplayname: + case Tags.MsgParamRecipientDisplayName: MsgParamRecipientDisplayName = tag.Value; break; case Tags.MsgParamRecipientId: diff --git a/TwitchLib.Client.Models/Subscriber.cs b/TwitchLib.Client.Models/Subscriber.cs index 244eba58..023df29d 100644 --- a/TwitchLib.Client.Models/Subscriber.cs +++ b/TwitchLib.Client.Models/Subscriber.cs @@ -47,7 +47,7 @@ public Subscriber( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -70,12 +70,13 @@ public Subscriber( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/UnraidNotification.cs b/TwitchLib.Client.Models/UnraidNotification.cs index 0147d464..2095f2b9 100644 --- a/TwitchLib.Client.Models/UnraidNotification.cs +++ b/TwitchLib.Client.Models/UnraidNotification.cs @@ -19,7 +19,7 @@ public UnraidNotification( List> badgeInfo, List> badges, string hexColor, - string displayMame, + string displayName, string emotes, string id, string login, @@ -36,12 +36,13 @@ public UnraidNotification( : base(badgeInfo, badges, hexColor, - displayMame, + displayName, emotes, id, login, isModerator, - msgId, roomId, + msgId, + roomId, isSubscriber, systemMsg, tmiSent, diff --git a/TwitchLib.Client.Models/UserState.cs b/TwitchLib.Client.Models/UserState.cs index b4ac8f00..de3b5bca 100644 --- a/TwitchLib.Client.Models/UserState.cs +++ b/TwitchLib.Client.Models/UserState.cs @@ -91,7 +91,7 @@ public UserState(IrcMessage ircMessage) UserType = TagHelper.ToUserType(tag.Value); break; default: - (UndocumentedTags = new()).Add(tag.Key, tag.Value); + (UndocumentedTags ??= new()).Add(tag.Key, tag.Value); break; } } diff --git a/TwitchLib.Client.Models/UserTimeout.cs b/TwitchLib.Client.Models/UserTimeout.cs index 98e5d388..1ceded1f 100644 --- a/TwitchLib.Client.Models/UserTimeout.cs +++ b/TwitchLib.Client.Models/UserTimeout.cs @@ -42,7 +42,7 @@ public UserTimeout(IrcMessage ircMessage) TargetUserId = tagValue; break; default: - (UndocumentedTags = new()).Add(tag.Key, tag.Value); + (UndocumentedTags ??= new()).Add(tag.Key, tag.Value); break; } } @@ -54,12 +54,12 @@ public UserTimeout(IrcMessage ircMessage) public UserTimeout( string channel, string username, - string targetuserId, + string targetUserId, TimeSpan timeoutDuration) { Channel = channel; Username = username; - TargetUserId = targetuserId; + TargetUserId = targetUserId; TimeoutDuration = timeoutDuration; } } diff --git a/TwitchLib.Client.Models/WhisperMessage.cs b/TwitchLib.Client.Models/WhisperMessage.cs index 80fa4122..a9c18574 100644 --- a/TwitchLib.Client.Models/WhisperMessage.cs +++ b/TwitchLib.Client.Models/WhisperMessage.cs @@ -91,7 +91,7 @@ public WhisperMessage(IrcMessage ircMessage, string botUsername) UserType = TagHelper.ToUserType(tag.Value); break; default: - (UndocumentedTags = new()).Add(tag.Key, tag.Value); + (UndocumentedTags ??= new()).Add(tag.Key, tag.Value); break; } }