refactor(bot): clean up cache extensions

This commit is contained in:
alyssa 2024-08-07 18:54:25 +09:00
parent ede9642a27
commit d305faf401
13 changed files with 27 additions and 34 deletions

View file

@ -40,7 +40,7 @@ public class SerilogGatewayEnricherFactory
if (await _cache.TryGetChannel(channel.Value) != null)
{
var botPermissions = await _cache.PermissionsIn(channel.Value);
var botPermissions = await _cache.BotPermissionsIn(channel.Value);
props.Add(new LogEventProperty("BotPermissions", new ScalarValue(botPermissions)));
}
}
@ -52,7 +52,7 @@ public class SerilogGatewayEnricherFactory
props.Add(new LogEventProperty("UserId", new ScalarValue(user.Value)));
if (evt is MessageCreateEvent mce)
props.Add(new LogEventProperty("UserPermissions", new ScalarValue(await _cache.PermissionsFor(mce))));
props.Add(new LogEventProperty("UserPermissions", new ScalarValue(await _cache.PermissionsForMCE(mce))));
return new Inner(props);
}