Пример #1
0
        public static void handleCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e)
        {
            string doubloons = WebCalls.getUserDoubloons(e.Username).Result;

            if (Common.WhisperClient != null)
            {
                Common.WhisperClient.SendWhisper(e.Username, string.Format("Your current doubloon count is: {0}", doubloons), Common.DryRun);
            }
        }
Пример #2
0
 public static void handleCommand(Objects.DiscordCommand e)
 {
     if (e.CommandsAsList.Count == 1)
     {
         string resp = WebCalls.getUserDoubloons(e.CommandsAsList[0].ToLower()).Result;
         if (resp != "n/a")
         {
             Common.DiscordClient.GetChannel(e.Channel_ID).SendMessage(string.Format("The doubloon count for '{0}' is: {1}", e.CommandsAsList[0], resp));
         }
         else
         {
             Common.DiscordClient.GetChannel(e.Channel_ID).SendMessage(string.Format("The user '{0}' was not found/invalid user.", e.CommandsAsList[0]));
         }
     }
     else
     {
         Common.DiscordClient.GetChannel(e.Channel_ID).SendMessage("You must provide the user you wish to get the doubloon count of.  Use !doubloons swiftyspiffy");
     }
 }
Пример #3
0
 public static void handleCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e)
 {
     if (Common.Cooldown.chatCommandAvailable(TwitchLib.ChatMessage.UType.Viewer, e.Command, 20))
     {
         if (int.Parse(WebCalls.getUserDoubloons(e.Username).Result) > Common.DiscordInviteLimit)
         {
             string oldInvite = WebCalls.getExistingDiscordInvite(e.Username).Result;
             if (oldInvite != null)
             {
                 if (Common.WhisperClient != null)
                 {
                     Common.WhisperClient.SendWhisper(e.Username, string.Format("It appears you've already requested an invite.  You may try accessing your old invite here (https://discord.gg/{0}), but it may be invalid.", oldInvite), Common.DryRun);
                 }
             }
             else
             {
                 //string invite = WebCalls.createInviteCode();
                 //if (Common.WhisperClient != null)
                 //    Common.WhisperClient.SendWhisper(e.Username, string.Format("Here is your BurkeBlack Crew Discord Chat invite.  You have two 2 minutes, and this link will expire after its first usage.  You will not receive another link. https://discord.gg/{0}", invite), Common.DryRun);
                 //WebCalls.addInviteCode(e.Username, invite);
             }
         }
         else
         {
             if (Common.WhisperClient != null)
             {
                 Common.WhisperClient.SendWhisper(e.Username, string.Format("You currently do not meet the {0} doubloon limit.  Please request an invite when you have met this requirement.", Common.DiscordInviteLimit), Common.DryRun);
             }
         }
     }
     else
     {
         if (Common.WhisperClient != null)
         {
             Common.WhisperClient.SendWhisper(e.Username, string.Format("There is a 20 second cooldown on this whisper command applied to everyone whispering me (The_Kraken_Bot).  Please try again shortly."));
         }
     }
 }