From 7c913c7b155ce0f8e103a92896508e6b09d2d90f Mon Sep 17 00:00:00 2001 From: alyssa Date: Fri, 8 Nov 2024 10:26:15 +0900 Subject: [PATCH] feat(bot): also cluster gateway cache on .internal --- Myriad/Cache/HTTPDiscordCache.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Myriad/Cache/HTTPDiscordCache.cs b/Myriad/Cache/HTTPDiscordCache.cs index c27fc349..e6aac7ee 100644 --- a/Myriad/Cache/HTTPDiscordCache.cs +++ b/Myriad/Cache/HTTPDiscordCache.cs @@ -48,7 +48,8 @@ public class HttpDiscordCache: IDiscordCache private async Task QueryCache(string endpoint, ulong guildId) { var cluster = _cacheEndpoint.Authority; - if (cluster.Contains(".service.consul")) + // todo: there should not be infra-specific code here + if (cluster.Contains(".service.consul") || cluster.Contains("process.pluralkit-gateway.internal")) // int(((guild_id >> 22) % shard_count) / 16) cluster = $"cluster{(int)(((guildId >> 22) % (ulong)_shardCount) / 16)}.{cluster}";