From 14b59146eb7602ba7e59fc8f445e6697f23ad1d6 Mon Sep 17 00:00:00 2001 From: gitb0i <64463178+gitb0i@users.noreply.github.com> Date: Sun, 3 Aug 2025 18:40:29 -0700 Subject: [PATCH] feat(onePingPerDM): never throttle pings from chosen users (#323) * feat(onePingPerDM): add ignoreUsers list for unthrottled pings Adds a comma-separated list of user IDs whose messages will always trigger an audio ping, even when OnePingPerDM would normally suppress subsequent pings. * Update index.ts * Update index.ts --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- src/plugins/onePingPerDM/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/onePingPerDM/index.ts b/src/plugins/onePingPerDM/index.ts index 0ef817816..d829f10d0 100644 --- a/src/plugins/onePingPerDM/index.ts +++ b/src/plugins/onePingPerDM/index.ts @@ -35,6 +35,12 @@ const settings = definePluginSettings({ description: "Receive audio pings for @everyone and @here in group DMs", default: false, }, + ignoreUsers: { + type: OptionType.STRING, + description: "User IDs (comma + space) whose pings should NEVER be throttled", + restartNeeded: true, + default: "" + } }); export default definePlugin({ @@ -54,6 +60,8 @@ export default definePlugin({ }] }], isPrivateChannelRead(message: MessageJSON) { + const ignoreList = settings.store.ignoreUsers.split(", ").filter(Boolean) + if (ignoreList.includes(message.author.id)) return true; const channelType = ChannelStore.getChannel(message.channel_id)?.type; if ( (channelType !== ChannelType.DM && channelType !== ChannelType.GROUP_DM) ||