mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +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)
|
if ((perms & PermissionSet.ViewChannel) == 0)
|
||||||
perms &= ~NeedsViewChannel;
|
perms &= ~NeedsViewChannel;
|
||||||
|
|
||||||
if ((perms & PermissionSet.SendMessages) == 0 && (!isThread || (perms & PermissionSet.SendMessagesInThreads) == 0))
|
if ((perms & PermissionSet.SendMessages) == 0)
|
||||||
perms &= ~NeedsSendMessages;
|
if (channel.Type == Channel.ChannelType.GuildForum && (perms & PermissionSet.SendMessagesInThreads) != 0)
|
||||||
|
perms |= PermissionSet.SendMessages;
|
||||||
|
else if (!isThread || (perms & PermissionSet.SendMessagesInThreads) == 0)
|
||||||
|
perms &= ~NeedsSendMessages;
|
||||||
|
|
||||||
return perms;
|
return perms;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue