DontFilterMe: Fix (Oops)

This commit is contained in:
thororen1234 2025-07-31 19:05:03 -04:00
parent 04355ef43a
commit 99c232d5f6
No known key found for this signature in database

View file

@ -44,7 +44,7 @@ export default definePlugin({
this.preSend = addMessagePreSendListener(async (channelId, messageObj) => {
const channel = ChannelStore.getChannel(channelId);
if (channel.isDM()) return { cancel: false };
if (PermissionStore.can(PermissionsBits.ADMINISTRATOR, channel) || PermissionStore.can(PermissionsBits.MANAGE_GUILD, channel)) return { cancel: true };
if (PermissionStore.can(PermissionsBits.ADMINISTRATOR, channel) || PermissionStore.can(PermissionsBits.MANAGE_GUILD, channel)) return { cancel: false };
const escapedStrings = filterList.map(escapeRegex);
const regexString = escapedStrings.join("|");
@ -56,6 +56,7 @@ export default definePlugin({
return { cancel: true };
}
}
return { cancel: false };
});
}