This commit is contained in:
Kwoth
2024-06-13 18:54:21 +00:00
parent a6adf73ecf
commit ab93380d7c
80 changed files with 12076 additions and 1694 deletions

View File

@@ -191,6 +191,12 @@ public sealed class BotCredsProvider : IBotCredsProvider
creds.Version = 7;
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
}
if (creds.Version <= 7)
{
creds.Version = 8;
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
}
}
}

View File

@@ -3,6 +3,7 @@ using OneOf.Types;
using StackExchange.Redis;
using System.Text.Json;
using System.Text.Json.Serialization;
using YamlDotNet.Core.Tokens;
namespace NadekoBot.Common;
@@ -47,6 +48,7 @@ public sealed class RedisBotCache : IBotCache
var success = await db.StringSetAsync(key.Key,
val,
expiry: expiry,
keepTtl: true,
when: overwrite ? When.Always : When.NotExists);
return success;