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:
@@ -208,11 +208,11 @@ public class GreetService : INService, IReadyExecutor
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private TypedKey<GreetSettings?> GreetSettingsKey(GreetType type)
|
||||
=> new($"greet_settings:{type}");
|
||||
private TypedKey<GreetSettings?> GreetSettingsKey(ulong gid, GreetType type)
|
||||
=> new($"greet_settings:{gid}:{type}");
|
||||
|
||||
public async Task<GreetSettings?> GetGreetSettingsAsync(ulong gid, GreetType type)
|
||||
=> await _cache.GetOrAddAsync<GreetSettings?>(GreetSettingsKey(type),
|
||||
=> await _cache.GetOrAddAsync<GreetSettings?>(GreetSettingsKey(gid, type),
|
||||
() => InternalGetGreetSettingsAsync(gid, type),
|
||||
TimeSpan.FromSeconds(3));
|
||||
|
||||
|
@@ -13,7 +13,7 @@ public sealed class ReactionRolesService : IReadyExecutor, INService, IReactionR
|
||||
{
|
||||
private readonly DbService _db;
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IBotCreds _creds;
|
||||
|
||||
private ConcurrentDictionary<ulong, List<ReactionRoleV2>> _cache;
|
||||
private readonly object _cacheLock = new();
|
||||
@@ -24,7 +24,7 @@ public sealed class ReactionRolesService : IReadyExecutor, INService, IReactionR
|
||||
DiscordSocketClient client,
|
||||
IPatronageService ps,
|
||||
DbService db,
|
||||
IBotCredentials creds)
|
||||
IBotCreds creds)
|
||||
{
|
||||
_db = db;
|
||||
_client = client;
|
||||
|
@@ -9,13 +9,13 @@ namespace NadekoBot.Modules.Administration;
|
||||
public sealed class StickyRolesService : INService, IReadyExecutor
|
||||
{
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IBotCreds _creds;
|
||||
private readonly DbService _db;
|
||||
private HashSet<ulong> _stickyRoles = new();
|
||||
|
||||
public StickyRolesService(
|
||||
DiscordSocketClient client,
|
||||
IBotCredentials creds,
|
||||
IBotCreds creds,
|
||||
DbService db)
|
||||
{
|
||||
_client = client;
|
||||
|
@@ -15,7 +15,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, INService
|
||||
private readonly IBotStrings _strings;
|
||||
private readonly DiscordSocketClient _client;
|
||||
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IBotCreds _creds;
|
||||
|
||||
private ImmutableDictionary<ulong, IDMChannel> ownerChannels =
|
||||
new Dictionary<ulong, IDMChannel>().ToImmutableDictionary();
|
||||
@@ -36,7 +36,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, INService
|
||||
CommandHandler cmdHandler,
|
||||
DbService db,
|
||||
IBotStrings strings,
|
||||
IBotCredentials creds,
|
||||
IBotCreds creds,
|
||||
IHttpClientFactory factory,
|
||||
BotConfigService bss,
|
||||
IPubSub pubSub,
|
||||
|
Reference in New Issue
Block a user