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

@ -100,7 +100,7 @@ public static class DiscordCacheExtensions
await cache.SaveChannel(thread);
}
public static async Task<PermissionSet> PermissionsIn(this IDiscordCache cache, ulong channelId)
public static async Task<PermissionSet> BotPermissionsIn(this IDiscordCache cache, ulong channelId)
{
var channel = await cache.GetRootChannel(channelId);
@ -108,7 +108,7 @@ public static class DiscordCacheExtensions
{
var userId = cache.GetOwnUser();
var member = await cache.TryGetSelfMember(channel.GuildId.Value);
return await cache.PermissionsFor(channelId, userId, member);
return await cache.PermissionsFor2(channelId, userId, member);
}
return PermissionSet.Dm;