From 58936438d91e2522aa80219e2a7d4c9032565321 Mon Sep 17 00:00:00 2001 From: nin0dev Date: Thu, 21 Nov 2024 06:35:39 -0500 Subject: [PATCH] userID blacklist --- index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index d519c68..1f2d73a 100644 --- a/index.ts +++ b/index.ts @@ -21,6 +21,10 @@ export default definePlugin({ type: OptionType.STRING, description: "Comma-separated list of channel IDs to watch" }, + userIDs: { + type: OptionType.STRING, + description: "Comma-separated list of user IDs to ignore" + }, maxChars: { type: OptionType.NUMBER, description: "Maximum chars to check", @@ -32,7 +36,7 @@ export default definePlugin({ ({ guildId, message }) { const msg = message as Message; - if (UserStore.getCurrentUser().id === msg.author.id) return; + if (UserStore.getCurrentUser().id === msg.author.id || selfPlugin.settings.store.userIDs?.split(",").includes(msg.author.id)) return; if (!selfPlugin.settings.store.channelIDs?.split(",").includes(msg.channel_id) || msg.content.length > selfPlugin.settings.store.maxChars) return; const res = await fetch("https://huskapi.nin0.dev", {