From 57f839dbcd305694ffd54e6e078f34ec3aeffd15 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 6 Aug 2022 17:47:24 +0200 Subject: [PATCH] Added client id as a potential fix for VoiceXp 'bug'. The solution may be to use different redis instances for each bot, or to switch from botCache: from 'redis' to 'memory' in creds.yml --- src/NadekoBot/Modules/Xp/XpService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Xp/XpService.cs b/src/NadekoBot/Modules/Xp/XpService.cs index c644f4b92..44fae7319 100644 --- a/src/NadekoBot/Modules/Xp/XpService.cs +++ b/src/NadekoBot/Modules/Xp/XpService.cs @@ -623,7 +623,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand => !user.IsDeafened && !user.IsMuted && !user.IsSelfDeafened && !user.IsSelfMuted; private TypedKey GetVoiceXpKey(ulong userId) - => new($"xp:vc_join:{userId}"); + => new($"xp:{_client.CurrentUser.Id}:vc_join:{userId}"); private async Task UserJoinedVoiceChannel(SocketGuildUser user) { @@ -767,8 +767,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand return Enumerable.Empty(); } - private static TypedKey GetUserRewKey(ulong userId) - => new($"xp:user_gain:{userId}"); + private TypedKey GetUserRewKey(ulong userId) + => new($"xp:{_client.CurrentUser.Id}:user_gain:{userId}"); private async Task SetUserRewardedAsync(ulong userId) => await _c.AddAsync(GetUserRewKey(userId),