Example #1
0
        private async Task CensorMessageAsync(SocketMessage message)
        {
            if (message == null)
            {
                return;
            }
            if (message.Author.IsBot)
            {
                return;
            }

            if (ProfileDatabase.Ready())
            {
                // Check if user offline
                if (!message.Author.IsBot && (message.Author.Status == UserStatus.Offline || message.Author.Status == UserStatus.Invisible))
                {
                    // Mark them as online for a loop, reset their last seen... THEY APPEARING!
                    ProfileDatabase.SetUserOnline(message.Author.Id);
                }
            }

            await Moderation.CheckMessageAsync(message);
        }