public static async Task ReactionAdded(SocketReaction reaction)
        {
            var msgList = Global.MessagesIdToTrack ?? new Dictionary <ulong, string>();

            if (msgList.ContainsKey(reaction.MessageId))
            {
                if (reaction.Emote.Name == "➕")
                {
                    var item  = msgList.FirstOrDefault(k => k.Key == reaction.MessageId);
                    var embed = BlogHandler.SubscribeToBlog(reaction.User.Value.Id, item.Value);
                }
            }
        }
Exemplo n.º 2
0
        private async Task ReactionAdded(Cacheable <IUserMessage, ulong> cacheMessage, ISocketMessageChannel channel, SocketReaction reaction)
        {
            if (reaction.User.Value.IsBot)
            {
                return;
            }

            var user    = _client.Guilds.First().GetUser(reaction.UserId);
            var roleIds = user.Roles.Select(r => r.Id).ToArray();

            (new ListReactionHandler()).HandleReactionAdded(new ListHelper.UserInfo(user.Id, roleIds), _listManager, cacheMessage, reaction);

            _triviaGames.HandleReactionAdded(cacheMessage, reaction);
            BlogHandler.ReactionAdded(reaction);
        }