mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 07:48:32 +00:00
Made the allow in all channels option a toggle
This commit is contained in:
parent
daee463e2a
commit
21654c8fd9
1 changed files with 5 additions and 1 deletions
|
@ -112,6 +112,10 @@ const settings = definePluginSettings({
|
||||||
bypasses["users"] = value.replace(/\s/g, '').split(',').filter(id => id.trim() !== '');
|
bypasses["users"] = value.replace(/\s/g, '').split(',').filter(id => id.trim() !== '');
|
||||||
await DataStore.set("bypassdnd", bypasses);
|
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 (bypasses.users.includes(message.author.id)) {
|
||||||
if (channelId === await PrivateChannelsStore.getOrEnsurePrivateChannel(message.author.id)) {
|
if (channelId === await PrivateChannelsStore.getOrEnsurePrivateChannel(message.author.id)) {
|
||||||
await showUserNotification(message);
|
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);
|
await showChannelNotification(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue