Exemplo n.º 1
0
        public async Task LogAsync(DisukuLog logMessage)
        {
            var date = $"[{DateTimeOffset.Now:MMM d - hh:mm:ss tt}]";

            Append($"{date} ", Color.DarkGray);
            Append($"[{logMessage.Severity}] ", await SeverityColor(logMessage.Severity));
            Append($"{ConvertSource(logMessage.Source)} ", Color.DarkGray);
            Append($"{logMessage.Message}\n", Color.White);
        }
Exemplo n.º 2
0
        private async Task OnReady()
        {
            await _client.SetGameAsync(_config.GameStatus, "", ActivityType.Watching);

            foreach (var guild in _client.Guilds)
            {
                var log = new DisukuLog
                {
                    Message  = $"Active in: {guild.Name}",
                    Severity = DisukuLogSeverity.Info,
                    Source   = "Discord"
                };
                await _logger.LogAsync(log);
            }
        }