public static void handleCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e) { if (Common.WhisperClient != null) { Common.WhisperClient.SendWhisper(e.Username, "The currently available whisper commands are: !notifyme, !removeme, !doubloons, !discordinvite, !giveawayhistory", Common.DryRun); } }
public static void handleCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e) { if (Common.WhisperClient != null) { Common.WhisperClient.SendWhisper(e.Username, string.Format("Your giveaway history can be seen here: http://burkeblack.tv/giveaways/listing.php?name={0}", e.Username)); } }
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); } }
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.")); } } }
// Handles all whisper commands (whispers that have ! prefix) from event public static void handleWhisperCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs command) { switch (command.Command) { case "notifyme": HardCodedWhisperCommands.OnlineNotifications.NotifyMe.handleCommand(command); break; case "removeme": HardCodedWhisperCommands.OnlineNotifications.RemoveMe.handleCommand(command); break; case "doubloons": HardCodedWhisperCommands.Doubloons.handleCommand(command); break; case "commands": HardCodedWhisperCommands.Commands.handleCommand(command); break; case "discordinvite": HardCodedWhisperCommands.DiscordInvite.handleCommand(command); break; case "giveawayhistory": HardCodedWhisperCommands.GiveawayHistory.handleCommand(command); break; default: if (Common.WhisperClient != null) { Common.WhisperClient.SendWhisper(command.Username, "To view available whisper commands, whisper the bot !commands", Common.DryRun); } //Handle dynamically created whisper commands break; } }
public static void handleCommand(TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e) { Common.OnlineNotifier.removeMe(e.Username); Common.command(e.Command, true); }
// Fires when a whisper is received that is prefixed with an ! public static void whisperOnCommand(object sender, TwitchLib.TwitchWhisperClient.OnCommandReceivedArgs e) { Common.command(string.Format("[WHISPER]COMMAND {0}: {1}", e.Username, e.Command + e.ArgumentsAsString), true); Commands.handleWhisperCommand(e); }