mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 08:34:27 -05:00 
			
		
		
		
	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
This commit is contained in:
		@@ -623,7 +623,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
 | 
			
		||||
        => !user.IsDeafened && !user.IsMuted && !user.IsSelfDeafened && !user.IsSelfMuted;
 | 
			
		||||
 | 
			
		||||
    private TypedKey<long> 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<ulong>();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static TypedKey<bool> GetUserRewKey(ulong userId)
 | 
			
		||||
        => new($"xp:user_gain:{userId}");
 | 
			
		||||
    private TypedKey<bool> GetUserRewKey(ulong userId)
 | 
			
		||||
        => new($"xp:{_client.CurrentUser.Id}:user_gain:{userId}");
 | 
			
		||||
    
 | 
			
		||||
    private async Task<bool> SetUserRewardedAsync(ulong userId)
 | 
			
		||||
        => await _c.AddAsync(GetUserRewKey(userId),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user