feat(bot): implement sharded http cache lookup

This commit is contained in:
alyssa 2024-09-27 18:53:31 +09:00
parent 9ff824c37b
commit 8f9b6f1554
3 changed files with 20 additions and 14 deletions

View file

@ -50,7 +50,7 @@ public class BotModule: Module
if (botConfig.HttpCacheUrl != null)
return new HttpDiscordCache(c.Resolve<ILogger>(),
c.Resolve<HttpClient>(), botConfig.HttpCacheUrl, botConfig.ClientId);
c.Resolve<HttpClient>(), botConfig.HttpCacheUrl, botConfig.Cluster?.TotalShards ?? 1, botConfig.ClientId);
return new MemoryDiscordCache(botConfig.ClientId);
}).AsSelf().SingleInstance();