Пример #1
0
        protected virtual void ReactionRemoved(MessageReactionRemoveEventArgs e)
        {
            if (!CheckRequirements(e.Channel, e.Message))
            {
                return;
            }

            OnReactionRemoved?.Invoke(e);
        }
Пример #2
0
 private Task ReactionRemoved(MessageReactionRemoveEventArgs e)
 {
     if (e.User.IsCurrent)
     {
         return(Task.CompletedTask);
     }
     if (e.Message.Id == _lastBotMessage.Id)
     {
         Console.WriteLine("[{0}] {1} removed reaction {2}", e.User.Id, e.User.Username, e.Emoji.GetDiscordName());
         OnReactionRemoved?.Invoke(e);
     }
     return(Task.CompletedTask);
 }
        private Task Discord_ReactionRemoved(ulong messageId, Optional <SocketUserMessage> arg2, SocketReaction reaction)
        {
            try
            {
                if (messageId == Message.Id)
                {
                    OnReactionRemoved?.Invoke(reaction);
                }
            }
            catch { }

            return(Task.CompletedTask);
        }
Пример #4
0
        private Task Discord_ReactionRemoved(Cacheable <IUserMessage, ulong> msg, ISocketMessageChannel channel, SocketReaction reaction)
        {
            Task.Run(() =>
            {
                try
                {
                    if (msg.Id == Message.Id)
                    {
                        OnReactionRemoved?.Invoke(reaction);
                    }
                }
                catch { }
            });

            return(Task.CompletedTask);
        }