you'll be able to edit nadeko mute role permisson overwrites witout them resettings now

This commit is contained in:
Master Kwoth 2017-11-18 17:45:11 +01:00
parent d4a5ef160c
commit 839dbcea5a

View File

@ -192,7 +192,8 @@ namespace NadekoBot.Modules.Administration.Services
{
try
{
if (!toOverwrite.PermissionOverwrites.Select(x => x.Permissions).Contains(denyOverwrite))
if (!toOverwrite.PermissionOverwrites.Any(x => x.TargetId == muteRole.Id
&& x.TargetType == PermissionTarget.Role))
{
await toOverwrite.AddPermissionOverwriteAsync(muteRole, denyOverwrite)
.ConfigureAwait(false);