Ejemplo n.º 1
0
 public static void handleCommand(TwitchLib.TwitchChatClient.OnCommandReceivedArgs e)
 {
     if (verifyCommand(e))
     {
         if (Common.LastFollow == null || Common.LastFollow.Channel.Name.ToLower() != e.ArgumentsAsList[0].ToLower())
         {
             Common.LastFollow = WebCalls.getFollowData(e.ArgumentsAsList[0].ToLower()).Result;
         }
         if (Common.LastFollow != null)
         {
             Common.ChatClient.SendMessage(Common.LastFollow.ChatMessage, Common.DryRun);
         }
         else
         {
             Common.ChatClient.SendMessage(string.Format("Failed to query '{0}' channel.  You can still follow them though! http://twitch.tv/{0}", e.ArgumentsAsList[0]), Common.DryRun);
         }
         Common.command(e.Command, true);
     }
     else
     {
         Common.command(e.Command, false);
     }
 }