feat: upgrade to .NET 6, refactor everything
This commit is contained in:
@@ -1,34 +1,33 @@
|
||||
namespace PluralKit.Bot
|
||||
namespace PluralKit.Bot;
|
||||
|
||||
public class BotConfig
|
||||
{
|
||||
public class BotConfig
|
||||
public static readonly string[] DefaultPrefixes = { "pk;", "pk!" };
|
||||
|
||||
public string Token { get; set; }
|
||||
public ulong? ClientId { get; set; }
|
||||
|
||||
// ASP.NET configuration merges arrays with defaults, so we leave this field nullable
|
||||
// and fall back to the separate default array at the use site :)
|
||||
// This does bind [] as null (therefore default) instead of an empty array, but I can live w/ that.
|
||||
public string[] Prefixes { get; set; }
|
||||
|
||||
public int? MaxShardConcurrency { get; set; }
|
||||
|
||||
public ulong? AdminRole { get; set; }
|
||||
|
||||
public ClusterSettings? Cluster { get; set; }
|
||||
|
||||
public string? GatewayQueueUrl { get; set; }
|
||||
|
||||
public string? DiscordBaseUrl { get; set; }
|
||||
|
||||
public bool DisableErrorReporting { get; set; } = false;
|
||||
|
||||
public record ClusterSettings
|
||||
{
|
||||
public static readonly string[] DefaultPrefixes = { "pk;", "pk!" };
|
||||
|
||||
public string Token { get; set; }
|
||||
public ulong? ClientId { get; set; }
|
||||
|
||||
// ASP.NET configuration merges arrays with defaults, so we leave this field nullable
|
||||
// and fall back to the separate default array at the use site :)
|
||||
// This does bind [] as null (therefore default) instead of an empty array, but I can live w/ that.
|
||||
public string[] Prefixes { get; set; }
|
||||
|
||||
public int? MaxShardConcurrency { get; set; }
|
||||
|
||||
public ulong? AdminRole { get; set; }
|
||||
|
||||
public ClusterSettings? Cluster { get; set; }
|
||||
|
||||
public string? GatewayQueueUrl { get; set; }
|
||||
|
||||
public string? DiscordBaseUrl { get; set; }
|
||||
|
||||
public bool DisableErrorReporting { get; set; } = false;
|
||||
|
||||
public record ClusterSettings
|
||||
{
|
||||
public string NodeName { get; set; }
|
||||
public int TotalShards { get; set; }
|
||||
public int TotalNodes { get; set; }
|
||||
}
|
||||
public string NodeName { get; set; }
|
||||
public int TotalShards { get; set; }
|
||||
public int TotalNodes { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user