diff --git a/src/EllieBot/Program.cs b/src/EllieBot/Program.cs index bb49ad9..a3ee8f1 100644 --- a/src/EllieBot/Program.cs +++ b/src/EllieBot/Program.cs @@ -1,13 +1,8 @@ using System.Reflection; -static string GetAppVersion() -{ - return Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "unknown"; -} - if (args.Length > 0 && args[0] == "--version") { - Console.WriteLine(GetAppVersion()); + Console.WriteLine(StatsService.BotVersion); return; } diff --git a/src/EllieBot/_common/Services/Impl/StatsService.cs b/src/EllieBot/_common/Services/Impl/StatsService.cs index 62d4a07..b7e6c5c 100644 --- a/src/EllieBot/_common/Services/Impl/StatsService.cs +++ b/src/EllieBot/_common/Services/Impl/StatsService.cs @@ -7,7 +7,7 @@ namespace EllieBot.Services; public sealed class StatsService : IStatsService, IReadyExecutor, IEService { public static string BotVersion - => typeof(Bot).Assembly.GetName().Version?.ToString(3) ?? "Custom"; + => typeof(Bot).Assembly.GetName().Version?.ToString(3) ?? "custom"; public string Author => "toastie_t0ast";