private string[] GetCauliflower(TwitchMessage message) { if (message.Message.Contains("eu")) { return(new string[] { $"[EU] Maeric's Cauliflower Score: {GuildWars.GetCauliflowerCount("eu")}" }); } else { return(new string[] { $"[NA] Maeric's Cauliflower Score: {GuildWars.GetCauliflowerCount("na")}" }); } }
public MainWindow() { Icon = Properties.Resources.raz_zone; InitializeComponent(); InitializeSubForms(); windowsMP.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(OnPlayStateChange); LoadControlSettings(); TwitchBot.Start(); TwitchBot.Commands.MainWindow = this; DiscordBot.Start(); GuildWars.GuildWarsInit(); gw2DataFetcher.RunWorkerAsync(); }
private string[] GetKP(TwitchMessage message) { if (CooldownDone("kp", 5)) { if (message.Message.Contains("eu")) { return(new string[] { $"[EU] {GuildWars.CountKP("eu")}" }); } else { return(new string[] { $"[NA] {GuildWars.CountKP("na")}" }); } } else { return(null); } }
private string[] GetBuild(TwitchMessage message) { if (File.Exists($"{BotTools.BasePath}\\resources\\builds.json")) { string characterName = GuildWars.GetMostRecentCharacter(); var builds = BotTools.ReadFromJson <Dictionary <string, string> >("resources\\builds"); if (builds.ContainsKey(characterName)) { return(new string[] { $"{characterName}'s build: {builds[characterName]}" }); } else { return(new string[] { $"No build data for {characterName}" }); } } else { return(new string[] { "I don't know about any builds yet!" }); } }
// Background Workers private void GW2InventoryFetcherWork(object sender, DoWorkEventArgs e) { GuildWars.FetchInventoryData(); BotTools.LogLine("GW2 Inventory Data Updated"); }