mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
fix: Fixed greet/bye messages showing wrong message in the wrong server sometimes
docs: Version upped to 5.1.12. Updated CHANGELOG.md
This commit is contained in:
@@ -119,7 +119,7 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||
}
|
||||
}
|
||||
|
||||
public void ModifyCredsFile(Action<IBotCredentials> func)
|
||||
public void ModifyCredsFile(Action<IBotCreds> func)
|
||||
{
|
||||
var ymlData = File.ReadAllText(CREDS_FILE_NAME);
|
||||
var creds = Yaml.Deserializer.Deserialize<Creds>(ymlData);
|
||||
@@ -137,18 +137,18 @@ 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 < 11)
|
||||
{
|
||||
creds.Version = 10;
|
||||
creds.Version = 11;
|
||||
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IBotCredentials GetCreds()
|
||||
public IBotCreds GetCreds()
|
||||
{
|
||||
lock (_reloadLock)
|
||||
{
|
||||
|
@@ -4,11 +4,11 @@ namespace NadekoBot.Common;
|
||||
|
||||
public sealed class RedisPubSub : IPubSub
|
||||
{
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IBotCreds _creds;
|
||||
private readonly ConnectionMultiplexer _multi;
|
||||
private readonly ISeria _serializer;
|
||||
|
||||
public RedisPubSub(ConnectionMultiplexer multi, ISeria serializer, IBotCredentials creds)
|
||||
public RedisPubSub(ConnectionMultiplexer multi, ISeria serializer, IBotCreds creds)
|
||||
{
|
||||
_multi = multi;
|
||||
_serializer = serializer;
|
||||
|
@@ -15,13 +15,13 @@ public class RedisBotStringsProvider : IBotStringsProvider
|
||||
|
||||
private readonly ConnectionMultiplexer _redis;
|
||||
private readonly IStringsSource _source;
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IBotCreds _creds;
|
||||
|
||||
public RedisBotStringsProvider(
|
||||
ConnectionMultiplexer redis,
|
||||
DiscordSocketClient discordClient,
|
||||
IStringsSource source,
|
||||
IBotCredentials creds)
|
||||
IBotCreds creds)
|
||||
{
|
||||
_redis = redis;
|
||||
_source = source;
|
||||
|
@@ -11,7 +11,7 @@ public class RemoteGrpcCoordinator : ICoordinator, IReadyExecutor
|
||||
private readonly Coordinator.Coordinator.CoordinatorClient _coordClient;
|
||||
private readonly DiscordSocketClient _client;
|
||||
|
||||
public RemoteGrpcCoordinator(IBotCredentials creds, DiscordSocketClient client)
|
||||
public RemoteGrpcCoordinator(IBotCreds creds, DiscordSocketClient client)
|
||||
{
|
||||
var coordUrl = string.IsNullOrWhiteSpace(creds.CoordinatorUrl) ? "http://localhost:3442" : creds.CoordinatorUrl;
|
||||
|
||||
|
Reference in New Issue
Block a user