From 665ff35d6bba2483c124706ffe073d8bf507e46c Mon Sep 17 00:00:00 2001 From: Aubrey Taylor Date: Thu, 30 Jan 2025 16:26:05 -0600 Subject: [PATCH] support disabling mentions on certain users --- flake.nix | 4 ++++ index.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 2e18daa..9514a64 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,10 @@ discord = lib.mkOption { type = lib.types.str; }; + mentionUser = lib.mkOption { + type = lib.types.bool; + default = true; + }; }; }; config = lib.mkIf config.services.wanireminder.enable { diff --git a/index.js b/index.js index 7123ca8..06da6fc 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,9 @@ for (let user of config.users) { content: message, username: "WaniKani Reminder", avatarURL: "https://pbs.twimg.com/profile_images/1213575248911552512/WP11ESTy_400x400.jpg", + allowedMentions: { + parse: user.mentionUser ? ["users"] : [], + } }) } }