mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(bot): don't unnecessarily require permission to create forum threads
This commit is contained in:
parent
05817afdba
commit
3e07c2dbb2
1 changed files with 5 additions and 2 deletions
|
|
@ -94,8 +94,11 @@ public static class PermissionExtensions
|
|||
if ((perms & PermissionSet.ViewChannel) == 0)
|
||||
perms &= ~NeedsViewChannel;
|
||||
|
||||
if ((perms & PermissionSet.SendMessages) == 0 && (!isThread || (perms & PermissionSet.SendMessagesInThreads) == 0))
|
||||
perms &= ~NeedsSendMessages;
|
||||
if ((perms & PermissionSet.SendMessages) == 0)
|
||||
if (channel.Type == Channel.ChannelType.GuildForum && (perms & PermissionSet.SendMessagesInThreads) != 0)
|
||||
perms |= PermissionSet.SendMessages;
|
||||
else if (!isThread || (perms & PermissionSet.SendMessagesInThreads) == 0)
|
||||
perms &= ~NeedsSendMessages;
|
||||
|
||||
return perms;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue