mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor: cache own user ID in IDiscordCache
- remove Cluster.User - remove Cluster.Application (it was only being used as an alternative to Cluster.User for some reason) - move Bot.PermissionsIn to DiscordCacheExtensions
This commit is contained in:
parent
24ac0725af
commit
7a5ba8246e
17 changed files with 61 additions and 40 deletions
|
|
@ -59,7 +59,7 @@ namespace PluralKit.Bot
|
|||
if (channel.Type != Channel.ChannelType.GuildText)
|
||||
throw new PKError("PluralKit cannot log messages to this type of channel.");
|
||||
|
||||
var perms = await _bot.PermissionsIn(channel.Id);
|
||||
var perms = await _cache.PermissionsIn(channel.Id);
|
||||
if (!perms.HasFlag(PermissionSet.SendMessages))
|
||||
throw new PKError("PluralKit is missing **Send Messages** permissions in the new log channel.");
|
||||
if (!perms.HasFlag(PermissionSet.EmbedLinks))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue