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