예제 #1
0
        public async Task FollowersOn(string channelName, string minutes)
        {
            int result = Int32.Parse(minutes);

            _twitchClient.FollowersOnlyOn(channelName, new TimeSpan(0, 0, result, 0));

            await Task.CompletedTask;
        }
예제 #2
0
 public void HandleTwitchCommand(string spokenText)
 {
     if (spokenText.IncludesTheWords("start", "follower", "only") ||
         spokenText.IncludesTheWords("start", "followers", "only"))
     {
         _client.FollowersOnlyOn(_twitchBotSettings.ChannelName, TEN_MINUTES);
     }
     else if (spokenText.IncludesTheWords("stop", "follower", "only") ||
              spokenText.IncludesTheWords("stop", "followers", "only"))
     {
         _client.FollowersOnlyOff(_twitchBotSettings.ChannelName);
     }
     else if (spokenText.IncludesTheWords("start", "sub", "only") ||
              spokenText.IncludesTheWords("start", "subs", "only") ||
              spokenText.IncludesTheWords("start", "subscriber", "only") ||
              spokenText.IncludesTheWords("start", "subscribers", "only"))
     {
         _client.SubscribersOnlyOn(_twitchBotSettings.ChannelName);
     }
     else if (spokenText.IncludesTheWords("stop", "sub", "only") ||
              spokenText.IncludesTheWords("stop", "subs", "only") ||
              spokenText.IncludesTheWords("stop", "subscriber", "only") ||
              spokenText.IncludesTheWords("stop", "subscribers", "only"))
     {
         _client.SubscribersOnlyOff(_twitchBotSettings.ChannelName);
     }
     else if (spokenText.IncludesTheWords("start", "slow", "mode"))
     {
         _client.SlowModeOn(_twitchBotSettings.ChannelName, TEN_MINUTES);
     }
     else if (spokenText.IncludesTheWords("stop", "slow", "mode"))
     {
         _client.SlowModeOff(_twitchBotSettings.ChannelName);
     }
     else if (spokenText.IncludesTheWords("clear", "chat"))
     {
         _client.ClearChat(_twitchBotSettings.ChannelName);
     }
     else
     {
         HandleCustomCommands(spokenText);
     }
 }
예제 #3
0
 internal static void FollowersOnlyOn(TwitchClient client, TimeSpan minutes)
 {
     client.FollowersOnlyOn(client.GetJoinedChannel(client.JoinedChannels[0].Channel), minutes);
 }