mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor(bot): clean up cache extensions
This commit is contained in:
parent
ede9642a27
commit
d305faf401
13 changed files with 27 additions and 34 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue