feat(bot): run both local and http cache to log differences

This commit is contained in:
alyssa 2024-10-13 05:08:12 +09:00
parent 9aad6f329c
commit f1ad221b0f
5 changed files with 150 additions and 29 deletions

View file

@ -99,13 +99,9 @@ public class Bot
private async Task OnEventReceived(int shardId, IGatewayEvent evt)
{
if (_cache is MemoryDiscordCache)
{
// we HandleGatewayEvent **before** getting the own user, because the own user is set in HandleGatewayEvent for ReadyEvent
await _cache.HandleGatewayEvent(evt);
await _cache.TryUpdateSelfMember(_config.ClientId, evt);
}
// we HandleGatewayEvent **before** getting the own user, because the own user is set in HandleGatewayEvent for ReadyEvent
await _cache.HandleGatewayEvent(evt);
await _cache.TryUpdateSelfMember(_config.ClientId, evt);
await OnEventReceivedInner(shardId, evt);
}