Compare commits

...

2 commits

Author SHA1 Message Date
5c72c6562f
Version upped to 5.1.13, updated CHANGELOG.md
Fixed seq comment in creds
2024-10-05 13:29:09 +13:00
dd939ce55a
Grpc api will no longer start unless it's enabled in creds 2024-10-05 13:24:40 +13:00
5 changed files with 14 additions and 7 deletions

View file

@ -2,6 +2,13 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
## [5.1.13] - 03.10.2024
### Fixed
- Grpc api server will no longer start unless enabled in creds
- Seq comment in creds fixed
## [5.1.12] - 03.10.2024
### Added

View file

@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Version>5.1.12</Version>
<Version>5.1.13</Version>
<!-- Output/build -->
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>

View file

@ -31,7 +31,7 @@ public class GrpcApiService : IEService, IReadyExecutor
public Task OnReadyAsync()
{
var creds = _creds.GetCreds();
if (creds.GrpcApi is null || creds.GrpcApi.Enabled)
if (creds.GrpcApi is null || !creds.GrpcApi.Enabled)
return Task.CompletedTask;
try

View file

@ -6,7 +6,7 @@ namespace EllieBot.Common;
public sealed class Creds : IBotCreds
{
[Comment("""DO NOT CHANGE""")]
public int Version { get; set; } = 11;
public int Version { get; set; } = 12;
[Comment("""Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/""")]
public string Token { get; set; }
@ -165,7 +165,7 @@ public sealed class Creds : IBotCreds
public GrpcApiConfig GrpcApi { get; set; }
[Comment("""
Url to
Url and api key to a seq server. If url is set, bot will try to send logs to it.
""")]
public SeqConfig Seq { get; set; }

View file

@ -137,12 +137,12 @@ public sealed class BotCredsProvider : IBotCredsProvider
var creds = Yaml.Deserializer.Deserialize<Creds>(File.ReadAllText(CREDS_FILE_NAME));
if (creds.Version <= 5)
{
creds.BotCache = BotCacheImplemenation.Redis;
creds.BotCache = BotCacheImplemenation.Memory;
}
if (creds.Version <= 9)
if (creds.Version < 12)
{
creds.Version = 10;
creds.Version = 12;
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
}
}