コード例 #1
0
 private async Task ReactionAdded(Cacheable <IUserMessage, ulong> cacheMessage, ISocketMessageChannel channel, SocketReaction reaction)
 {
     if (reaction.User.Value.IsBot)
     {
         return;
     }
     _triviaGames.HandleReactionAdded(cacheMessage, reaction);
     BlogHandler.ReactionAdded(reaction);
 }
コード例 #2
0
        private async Task ReactionAdded(Cacheable <IUserMessage, ulong> cacheMessage, ISocketMessageChannel channel, SocketReaction reaction)
        {
            if (reaction.User.Value.IsBot)
            {
                return;
            }

            InversionOfControl.Container.GetInstance <ListManager>().HandleReactionAdded(cacheMessage, reaction);

            _triviaGames.HandleReactionAdded(cacheMessage, reaction);
            BlogHandler.ReactionAdded(reaction);
        }
コード例 #3
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);
        }
コード例 #4
0
ファイル: CommandHandler.cs プロジェクト: Phytal/Wsashi
 public async Task OnReactionAdded(Cacheable <IUserMessage, ulong> cache, ISocketMessageChannel channel, SocketReaction reaction)
 {
     if (!reaction.User.Value.IsBot)
     {
         /*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);
          *  }
          * }*/
         // Checks if the rection is associated with a running game and if it is
         // from the same user who ran the command - if so it handles it
         await TriviaGames.HandleReactionAdded(cache, reaction);
     }
 }