private async Task handleItTho(Cacheable <IUserMessage, ulong> arg1, EventAction act, Discord.WebSocket.SocketReaction arg3) { var user = Program.Client.GetUser(arg3.UserId); if (user == null || user.IsBot) { return; } if (messages.TryGetValue(arg1.Id, out var msg)) { if (msg.Events.HasFlag(act) == false) { return; } var eventArgs = new ReactionEventArgs() { Emote = arg3.Emote, User = user, Message = msg.Message, State = msg.State, Action = act }; msg.Method.Invoke(eventArgs); } await Task.CompletedTask; }
private async Task Client_ReactionAdded(Cacheable <IUserMessage, ulong> arg1, Cacheable <IMessageChannel, ulong> arg2, Discord.WebSocket.SocketReaction arg3) { await handleItTho(arg1, EventAction.Added, arg3); }
internal void AddReaction(SocketReaction reaction) { _reactions.Add(reaction); }