diff --git a/TwitchLib.PubSub/Events/OnFollowArgs.cs b/TwitchLib.PubSub/Events/OnFollowArgs.cs deleted file mode 100644 index b495ae1..0000000 --- a/TwitchLib.PubSub/Events/OnFollowArgs.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -namespace TwitchLib.PubSub.Events -{ - /// - /// - /// Class OnFollowArgs. - /// - public class OnFollowArgs : EventArgs - { - /// - /// The followed channel identifier - /// - public string FollowedChannelId; - /// - /// The display name - /// - public string DisplayName; - /// - /// The username - /// - public string Username; - /// - /// The user identifier - /// - public string UserId; - } -} diff --git a/TwitchLib.PubSub/Interfaces/ITwitchPubSub.cs b/TwitchLib.PubSub/Interfaces/ITwitchPubSub.cs index 2be0c14..f714242 100644 --- a/TwitchLib.PubSub/Interfaces/ITwitchPubSub.cs +++ b/TwitchLib.PubSub/Interfaces/ITwitchPubSub.cs @@ -52,10 +52,6 @@ public interface ITwitchPubSub /// event EventHandler OnEmoteOnlyOff; /// - /// Occurs when [on follow]. - /// - event EventHandler OnFollow; - /// /// Occurs when [on host]. /// event EventHandler OnHost; @@ -226,11 +222,6 @@ public interface ITwitchPubSub /// The channel twitch identifier. void ListenToChatModeratorActions(string myTwitchId, string channelTwitchId); /// - /// Listens to follows. - /// - /// The channel twitch identifier. - void ListenToFollows(string channelId); - /// /// Listens to subscriptions. /// /// The channel identifier. diff --git a/TwitchLib.PubSub/Models/Responses/Message.cs b/TwitchLib.PubSub/Models/Responses/Message.cs index be421d0..64685d5 100644 --- a/TwitchLib.PubSub/Models/Responses/Message.cs +++ b/TwitchLib.PubSub/Models/Responses/Message.cs @@ -66,9 +66,6 @@ internal Message(JObject jsonObject) case "channel-ext-v1": MessageData = new ChannelExtensionBroadcast(encodedJsonMessage); break; - case "following": - MessageData = new Following(encodedJsonMessage); - break; case "community-points-channel-v1": MessageData = new CommunityPointsChannel(encodedJsonMessage); break; diff --git a/TwitchLib.PubSub/Models/Responses/Messages/Following.cs b/TwitchLib.PubSub/Models/Responses/Messages/Following.cs deleted file mode 100644 index b26d9f3..0000000 --- a/TwitchLib.PubSub/Models/Responses/Messages/Following.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Newtonsoft.Json.Linq; - -namespace TwitchLib.PubSub.Models.Responses.Messages -{ - /// - /// Following model constructor. - /// Implements the - /// - /// - /// - public class Following : MessageData - { - /// - /// Following user display name. - /// - /// The display name. - public string DisplayName { get; } - /// - /// Following user username. - /// - /// The username. - public string Username { get; } - /// - /// Following user user-id. - /// - /// The user identifier. - public string UserId { get; } - /// - /// Gets the followed channel identifier. - /// - /// The followed channel identifier. - public string FollowedChannelId { get; internal set; } - - /// - /// Following constructor. - /// - /// The json string. - public Following(string jsonStr) - { - var json = JObject.Parse(jsonStr); - DisplayName = json["display_name"].ToString(); - Username = json["username"].ToString(); - UserId = json["user_id"].ToString(); - } - } -} diff --git a/TwitchLib.PubSub/TwitchPubSub.cs b/TwitchLib.PubSub/TwitchPubSub.cs index ace1ac8..07d4209 100644 --- a/TwitchLib.PubSub/TwitchPubSub.cs +++ b/TwitchLib.PubSub/TwitchPubSub.cs @@ -208,11 +208,6 @@ public class TwitchPubSub : ITwitchPubSub, IDisposable public event EventHandler OnChannelExtensionBroadcast; /// /// - /// Fires when PubSub receives notice when a user follows the designated channel. - /// - public event EventHandler OnFollow; - /// - /// /// Fires when PubSub receives notice when a custom reward has been created on the specified channel. /// [Obsolete("This event fires on an undocumented/retired/obsolete topic.", false)] @@ -626,11 +621,6 @@ private async Task ParseMessageAsync(string message) return; } break; - case "following": - var f = (Following)msg.MessageData; - f.FollowedChannelId = msg.Topic.Split('.')[1]; - OnFollow?.Invoke(this, new OnFollowArgs { FollowedChannelId = f.FollowedChannelId, DisplayName = f.DisplayName, UserId = f.UserId, Username = f.Username }); - return; case "community-points-channel-v1": var cpc = msg.MessageData as CommunityPointsChannel; switch (cpc?.Type) @@ -823,19 +813,6 @@ private void UnaccountedFor(string message) } #region Listeners - /// - /// - /// Sends a request to listenOn follows coming into a specified channel. - /// - /// The channel identifier. - public void ListenToFollows(string channelId) - { - // This topic is not documented - var topic = $"following.{channelId}"; - _topicToChannelId[topic] = channelId; - ListenToTopic(topic); - } - /// /// /// Sends a request to listenOn timeouts and bans in a specific channel