INNER CODE UNIT · C#

GetTextColor

kwsch/SysBot.NET · SysBot.Pokemon.Discord/SysCord.cs:80

    private static ConsoleColor GetTextColor(LogSeverity sv) => sv switch
    {
        LogSeverity.Critical => ConsoleColor.Red,
        LogSeverity.Error => ConsoleColor.Red,
        LogSeverity.Warning => ConsoleColor.Yellow,
        LogSeverity.Info => ConsoleColor.White,
        LogSeverity.Verbose => ConsoleColor.DarkGray,
        LogSeverity.Debug => ConsoleColor.DarkGray,
        _ => Console.ForegroundColor,
    };

    public async Task MainAsync(string apiToken, CancellationToken token)
    {
        await InitCommands().ConfigureAwait(false);
        await _client.LoginAsync(TokenType.Bot, apiToken).ConfigureAwait(false);

        var app = await _client.GetApplicationInfoAsync().ConfigureAwait(false);
        _manager.SetOwnership(app);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…