mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Updated creds_example.yml, fixed some async compilation warnings
This commit is contained in:
		@@ -96,7 +96,7 @@ Windows default
 | 
			
		||||
 | 
			
		||||
    public Creds()
 | 
			
		||||
    {
 | 
			
		||||
        Version = 1;
 | 
			
		||||
        Version = 3;
 | 
			
		||||
        Token = string.Empty;
 | 
			
		||||
        OwnerIds = new List<ulong>();
 | 
			
		||||
        TotalShards = 1;
 | 
			
		||||
 
 | 
			
		||||
@@ -147,10 +147,10 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public async Task<ImageData?> GenerateSparklineAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    public Task<ImageData?> GenerateSparklineAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    {
 | 
			
		||||
        if (series.Count == 0)
 | 
			
		||||
            return default;
 | 
			
		||||
            return Task.FromResult<ImageData?>(default);
 | 
			
		||||
 | 
			
		||||
        using var image = CreateCanvasInternal();
 | 
			
		||||
 | 
			
		||||
@@ -161,13 +161,13 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi
 | 
			
		||||
            ctx.DrawLines(_sparklineColor, 2, points);
 | 
			
		||||
        });
 | 
			
		||||
    
 | 
			
		||||
        return new("png", image.ToStream());
 | 
			
		||||
        return Task.FromResult<ImageData?>(new("png", image.ToStream()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public async Task<ImageData?> GenerateCombinedChartAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    public Task<ImageData?> GenerateCombinedChartAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    {
 | 
			
		||||
        if (series.Count == 0)
 | 
			
		||||
            return default;
 | 
			
		||||
            return Task.FromResult<ImageData?>(default);
 | 
			
		||||
 | 
			
		||||
        using var image = CreateCanvasInternal();
 | 
			
		||||
        
 | 
			
		||||
@@ -182,13 +182,13 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi
 | 
			
		||||
            ctx.DrawLines(Color.ParseHex("00FFFFAA"), 1, points);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        return new("png", image.ToStream());
 | 
			
		||||
        return Task.FromResult<ImageData?>(new("png", image.ToStream()));
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public async Task<ImageData?> GenerateCandleChartAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    public Task<ImageData?> GenerateCandleChartAsync(IReadOnlyCollection<CandleData> series)
 | 
			
		||||
    {
 | 
			
		||||
        if (series.Count == 0)
 | 
			
		||||
            return default;
 | 
			
		||||
            return Task.FromResult<ImageData?>(default);
 | 
			
		||||
 | 
			
		||||
        using var image = CreateCanvasInternal();
 | 
			
		||||
 | 
			
		||||
@@ -197,6 +197,6 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi
 | 
			
		||||
        var drawData = GetChartDrawingDataInternal(series);
 | 
			
		||||
        DrawChartData(image, drawData);
 | 
			
		||||
 | 
			
		||||
        return new("png", image.ToStream());
 | 
			
		||||
        return Task.FromResult<ImageData?>(new("png", image.ToStream()));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -121,9 +121,9 @@ public sealed class BotCredsProvider : IBotCredsProvider
 | 
			
		||||
        if (File.Exists(CREDS_FILE_NAME))
 | 
			
		||||
        {
 | 
			
		||||
            var creds = Yaml.Deserializer.Deserialize<Creds>(File.ReadAllText(CREDS_FILE_NAME));
 | 
			
		||||
            if (creds.Version <= 1)
 | 
			
		||||
            if (creds.Version <= 2)
 | 
			
		||||
            {
 | 
			
		||||
                creds.Version = 2;
 | 
			
		||||
                creds.Version = 3;
 | 
			
		||||
                File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# DO NOT CHANGE
 | 
			
		||||
version: 1
 | 
			
		||||
version: 3
 | 
			
		||||
# Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/
 | 
			
		||||
token: ''
 | 
			
		||||
# List of Ids of the users who have bot owner permissions
 | 
			
		||||
@@ -19,14 +19,14 @@ votes:
 | 
			
		||||
# Example: https://votes.my.cool.bot.com
 | 
			
		||||
  topggServiceUrl: ''
 | 
			
		||||
  # Authorization header value sent to the TopGG service url with each request
 | 
			
		||||
# This should be equivalent to the TopggKey in your NadekoBot.Votes api appsettings.json file
 | 
			
		||||
  # This should be equivalent to the TopggKey in your NadekoBot.Votes api appsettings.json file
 | 
			
		||||
  topggKey: ''
 | 
			
		||||
  # discords.com votes service url
 | 
			
		||||
# This is the url of your instance of the NadekoBot.Votes api
 | 
			
		||||
# Example: https://votes.my.cool.bot.com
 | 
			
		||||
  # This is the url of your instance of the NadekoBot.Votes api
 | 
			
		||||
  # Example: https://votes.my.cool.bot.com
 | 
			
		||||
  discordsServiceUrl: ''
 | 
			
		||||
  # Authorization header value sent to the Discords service url with each request
 | 
			
		||||
# This should be equivalent to the DiscordsKey in your NadekoBot.Votes api appsettings.json file
 | 
			
		||||
  # This should be equivalent to the DiscordsKey in your NadekoBot.Votes api appsettings.json file
 | 
			
		||||
  discordsKey: ''
 | 
			
		||||
# Patreon auto reward system settings.
 | 
			
		||||
# go to https://www.patreon.com/portal -> my clients -> create client
 | 
			
		||||
@@ -65,17 +65,24 @@ timezoneDbApiKey:
 | 
			
		||||
coinmarketcapApiKey: 
 | 
			
		||||
# Api key used for Osu related commands. Obtain this key at https://osu.ppy.sh/p/api
 | 
			
		||||
osuApiKey: 
 | 
			
		||||
# Optional Trovo client id.
 | 
			
		||||
# You should use this if Trovo stream notifications stopped working or you're getting ratelimit errors.
 | 
			
		||||
trovoClientId: 
 | 
			
		||||
# Obtain by creating an application at https://dev.twitch.tv/console/apps
 | 
			
		||||
twitchClientId: 
 | 
			
		||||
# Obtain by creating an application at https://dev.twitch.tv/console/apps
 | 
			
		||||
twitchClientSecret: 
 | 
			
		||||
# Command and args which will be used to restart the bot.
 | 
			
		||||
# Only used if bot is executed directly (NOT through the coordinator)
 | 
			
		||||
# placeholders: 
 | 
			
		||||
#     {0} -> shard id 
 | 
			
		||||
#     {1} -> total shards
 | 
			
		||||
# placeholders:
 | 
			
		||||
# {0} -> shard id
 | 
			
		||||
# {1} -> total shards
 | 
			
		||||
# Linux default
 | 
			
		||||
#     cmd: dotnet
 | 
			
		||||
#     args: "NadekoBot.dll -- {0}"
 | 
			
		||||
# cmd: dotnet
 | 
			
		||||
# args: "NadekoBot.dll -- {0}"
 | 
			
		||||
# Windows default
 | 
			
		||||
#     cmd: "NadekoBot.exe"
 | 
			
		||||
#     args: "{0}"
 | 
			
		||||
# cmd: NadekoBot.exe
 | 
			
		||||
# args: {0}
 | 
			
		||||
restartCommand:
 | 
			
		||||
  cmd: 
 | 
			
		||||
  args: 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user