diff --git a/Bot/Coc.cs b/Bot/Coc.cs index ff7357b..bd524b7 100644 --- a/Bot/Coc.cs +++ b/Bot/Coc.cs @@ -3,9 +3,9 @@ namespace Hyperstellar; -internal class Coc +internal sealed class Coc { - private class ClanUtil + private sealed class ClanUtil { internal readonly Clan _clan; internal readonly Dictionary _members = []; @@ -52,7 +52,7 @@ internal readonly struct DonationTuple(int donated, int received) } private const string ClanId = "#2QU2UCJJC"; - internal static readonly ClashOfClansClient s_client = new(Secrets.Coc); + internal static readonly ClashOfClansClient s_client = new(Secrets.s_coc); #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. private static ClanUtil s_prevClan; diff --git a/Bot/Discord.cs b/Bot/Discord.cs index 3aee0ec..0532829 100644 --- a/Bot/Discord.cs +++ b/Bot/Discord.cs @@ -4,7 +4,7 @@ namespace Hyperstellar; -internal class Discord +internal sealed class Discord { #if DEBUG private const ulong BotLogId = 666431254312517633; @@ -34,7 +34,7 @@ internal static async Task InitAsync() { s_bot.Log += Log; s_bot.Ready += Ready; - await s_bot.LoginAsync(TokenType.Bot, Secrets.Discord); + await s_bot.LoginAsync(TokenType.Bot, Secrets.s_discord); await s_bot.StartAsync(); } diff --git a/Bot/Secrets.cs b/Bot/Secrets.cs index afb3016..9da53a3 100644 --- a/Bot/Secrets.cs +++ b/Bot/Secrets.cs @@ -1,15 +1,15 @@ using Newtonsoft.Json; -internal class Secrets +internal sealed class Secrets { - internal static readonly string Discord; - internal static readonly string Coc; + internal static readonly string s_discord; + internal static readonly string s_coc; static Secrets() { string json = File.ReadAllText("secrets.json"); Dictionary dict = JsonConvert.DeserializeObject>(json)!; - Discord = dict["discord"]; - Coc = dict["coc"]; + s_discord = dict["discord"]; + s_coc = dict["coc"]; } } \ No newline at end of file diff --git a/Bot/Sql/Db.cs b/Bot/Sql/Db.cs index e22dd02..4467e5b 100644 --- a/Bot/Sql/Db.cs +++ b/Bot/Sql/Db.cs @@ -2,7 +2,7 @@ namespace Hyperstellar.Sql; -internal class Db +internal sealed class Db { private static readonly SQLiteConnection s_db = new("Hyperstellar.db"); }