private async Task OnReactionChanged(IEmote emote, ReactionListener.Action action) { if (emote.Equals(Damage)) { Damaged = !Damaged; } else { if (emote.Equals(CurrentTab)) { CurrentIndex = (CurrentIndex + 1) % NormalCGs[CurrentTab].Count; } else { CurrentIndex = 0; CurrentTab = emote; } } var newUrl = Damaged ? DamagedCGs[CurrentTab][CurrentIndex] : NormalCGs[CurrentTab][CurrentIndex]; if (newUrl != CurrentUrl) { CurrentUrl = newUrl; await UpdateMessage(); } }
private async Task UpdateMessageAsync(IEmote emote, ReactionListener.Action action) { HelpMessageEmbed = Tabs.Where(tab => tab.Key.Equals(emote)).First().Value; await SendMessage(); }