oops, actually check guild permissions as well in channel EveryonePermissions
This commit is contained in:
parent
4c97a9daf6
commit
55c56c4e58
@ -43,11 +43,12 @@ namespace Myriad.Extensions
|
||||
if (channel.Type == Channel.ChannelType.Dm)
|
||||
return PermissionSet.Dm;
|
||||
|
||||
var defaultPermissions = cache.GetGuild(channel.GuildId!.Value).EveryonePermissions();
|
||||
var overwrite = channel.PermissionOverwrites?.FirstOrDefault(r => r.Id == channel.GuildId);
|
||||
if (overwrite == null)
|
||||
return cache.GetGuild(channel.GuildId!.Value).EveryonePermissions();
|
||||
return defaultPermissions;
|
||||
|
||||
var perms = PermissionSet.None;
|
||||
var perms = defaultPermissions;
|
||||
perms &= ~overwrite.Deny;
|
||||
perms |= overwrite.Allow;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user