From 21654c8fd9de4e5514701976b638d71e7bf7b1af Mon Sep 17 00:00:00 2001 From: Inbestigator Date: Wed, 6 Mar 2024 09:01:46 -0800 Subject: [PATCH] Made the allow in all channels option a toggle --- src/plugins/bypassDND/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/bypassDND/index.tsx b/src/plugins/bypassDND/index.tsx index cdc4b37b0..cc22feeb7 100644 --- a/src/plugins/bypassDND/index.tsx +++ b/src/plugins/bypassDND/index.tsx @@ -112,6 +112,10 @@ const settings = definePluginSettings({ bypasses["users"] = value.replace(/\s/g, '').split(',').filter(id => id.trim() !== ''); await DataStore.set("bypassdnd", bypasses); }, + }, + allowOutsideOfDM: { + type: OptionType.BOOLEAN, + description: "Allow selected users to send notifications outside of DM (acts like a channel/guild bypass, but it's for all messages sent by the selected users)", } }); @@ -150,7 +154,7 @@ export default definePlugin({ if (bypasses.users.includes(message.author.id)) { if (channelId === await PrivateChannelsStore.getOrEnsurePrivateChannel(message.author.id)) { await showUserNotification(message); - } else if (message.content.includes(`<@${currentUser.id}>`) || message.mentions.some(mention => mention.id === currentUser.id)) { + } else if ((message.content.includes(`<@${currentUser.id}>`) || message.mentions.some(mention => mention.id === currentUser.id)) && settings.store.allowOutsideOfDM) { await showChannelNotification(message); } }