Exemplo n.º 1
0
 private async Task MessageUpdated(Cacheable <IMessage, ulong> cacheMessageBefore, SocketMessage messageAfter,
                                   ISocketMessageChannel channel)
 {
     if (!cacheMessageBefore.HasValue)
     {
         return;
     }
     if (cacheMessageBefore.Value.Author.IsBot)
     {
         return;
     }
     _commandHandler._client_MessageUpdated(cacheMessageBefore, messageAfter, channel);
     _serverActivityLogger.Client_MessageUpdated(cacheMessageBefore, messageAfter, channel);
     _userSkatisticsCounter.Client_MessageUpdated(cacheMessageBefore, messageAfter, channel);
 }
Exemplo n.º 2
0
        private async Task MessageUpdated(Cacheable <IMessage, ulong> cacheMessageBefore, SocketMessage messageAfter,
                                          ISocketMessageChannel channel)
        {
            if (!cacheMessageBefore.HasValue)
            {
                return;
            }
            if (cacheMessageBefore.Value.Author.IsBot)
            {
                return;
            }


            _global.TimeSpendOnLastMessage.AddOrUpdate(messageAfter.Author.Id, Stopwatch.StartNew(), (key, oldValue) => Stopwatch.StartNew());


            _commandHandler._client_MessageUpdated(cacheMessageBefore, messageAfter, channel);

            _serverActivityLogger.Client_MessageUpdated(cacheMessageBefore, messageAfter, channel);
            _userSkatisticsCounter.Client_MessageUpdated(cacheMessageBefore, messageAfter, channel);
        }