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

@ -103,7 +103,7 @@ public static class DiscordCacheExtensions
public static async Task<PermissionSet> BotPermissionsIn(this IDiscordCache cache, ulong guildId, ulong channelId)
{
if (cache is HttpDiscordCache)
return await ((HttpDiscordCache)cache).BotPermissions(guildId, channelId);
return await ((HttpDiscordCache)cache).BotChannelPermissions(guildId, channelId);
var channel = await cache.GetRootChannel(guildId, channelId);