3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

fix: fix remove_roles_on_mute: true not working

This commit is contained in:
Dragory 2021-11-02 20:10:28 +02:00
parent d80e642cba
commit 3648968439
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -72,7 +72,7 @@ export async function muteUser(
if (removeRoles) {
// exclude managed roles from being removed
const managedRoles = pluginData.guild.roles.cache.filter((x) => x.managed).map((y) => y.id);
newRoles = currentUserRoles.filter((r) => !managedRoles.includes(r));
newRoles = currentUserRoles.filter((r) => managedRoles.includes(r));
await member.roles.set(newRoles as Snowflake[]);
}
} else {