Bot version retrieved via --version will now match the version in .stats
This commit is contained in:
parent
3653d97c90
commit
da0eff4339
2 changed files with 2 additions and 7 deletions
src/EllieBot
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue