diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index 8bfeb8d..0464438 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -34,7 +34,7 @@ public class CryptoService : IEService var gElement = xml["svg"]?["g"]; if (gElement is null) - return Array.Empty<PointF>(); + return []; Span<PointF> points = new PointF[gElement.ChildNodes.Count]; var cnt = 0; @@ -73,7 +73,7 @@ public class CryptoService : IEService } if (cnt == 0) - return Array.Empty<PointF>(); + return []; return points.Slice(0, cnt).ToArray(); } diff --git a/src/EllieBot/_common/Creds.cs b/src/EllieBot/_common/Creds.cs index 927bfb6..8a76f57 100644 --- a/src/EllieBot/_common/Creds.cs +++ b/src/EllieBot/_common/Creds.cs @@ -6,7 +6,7 @@ namespace EllieBot.Common; public sealed class Creds : IBotCreds { [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 13; + public int Version { get; set; } = 20; [Comment("""Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/""")] public string Token { get; set; } @@ -148,8 +148,8 @@ public sealed class Creds : IBotCreds {0} -> shard id {1} -> total shards Linux default - cmd: dotnet - args: "EllieBot.dll -- {0}" + cmd: EllieBot + args: "{0}" Windows default cmd: EllieBot.exe args: "{0}" diff --git a/src/EllieBot/_common/Impl/BotCredsProvider.cs b/src/EllieBot/_common/Impl/BotCredsProvider.cs index 3b03764..e57623d 100644 --- a/src/EllieBot/_common/Impl/BotCredsProvider.cs +++ b/src/EllieBot/_common/Impl/BotCredsProvider.cs @@ -77,7 +77,8 @@ public sealed class BotCredsProvider : IBotCredsProvider if (string.IsNullOrWhiteSpace(_creds.Token)) { - Log.Error("Token is missing from data/creds.yml or Environment variables.\nAdd it and restart the program"); + Log.Error( + "Token is missing from data/creds.yml or Environment variables.\nAdd it and restart the program"); Helpers.ReadErrorAndExit(1); return; } @@ -85,17 +86,18 @@ public sealed class BotCredsProvider : IBotCredsProvider if (string.IsNullOrWhiteSpace(_creds.RestartCommand?.Cmd) || string.IsNullOrWhiteSpace(_creds.RestartCommand?.Args)) { - if (Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix || + Environment.OSVersion.Platform == PlatformID.MacOSX) { - _creds.RestartCommand = new RestartConfig() + _creds.RestartCommand = new() { - Args = "dotnet", - Cmd = "EllieBot.dll -- {0}" + Args = "EllieBot", + Cmd = "{0}" }; } else { - _creds.RestartCommand = new RestartConfig() + _creds.RestartCommand = new() { Args = "EllieBot.exe", Cmd = "{0}" diff --git a/src/EllieBot/data/creds_example.yml b/src/EllieBot/data/creds_example.yml index b2ae00e..365247c 100644 --- a/src/EllieBot/data/creds_example.yml +++ b/src/EllieBot/data/creds_example.yml @@ -111,8 +111,8 @@ twitchClientSecret: # {0} -> shard id # {1} -> total shards # Linux default -# cmd: dotnet -# args: "EllieBot.dll -- {0}" +# cmd: EllieBot +# args: "{0}" # Windows default # cmd: EllieBot.exe # args: "{0}"