From caed7cd92c5d6dfa74d00fbc752116c015acf55d Mon Sep 17 00:00:00 2001 From: Noxillio Date: Sun, 19 May 2024 00:22:45 +0000 Subject: [PATCH] MoreUserTags: If server owner tag is disabled, do not give other tags (#2219) --- src/plugins/moreUserTags/index.tsx | 9 +++++++++ src/utils/constants.ts | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 1257b45..9c848df 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -354,6 +354,15 @@ export default definePlugin({ if (location === "chat" && !settings.tagSettings[tag.name].showInChat) continue; if (location === "not-chat" && !settings.tagSettings[tag.name].showInNotChat) continue; + // If the owner tag is disabled, and the user is the owner of the guild, + // avoid adding other tags because the owner will always match the condition for them + if ( + tag.name !== "OWNER" && + GuildStore.getGuild(channel?.guild_id)?.ownerId === user.id && + (location === "chat" && !settings.tagSettings.OWNER.showInChat) || + (location === "not-chat" && !settings.tagSettings.OWNER.showInNotChat) + ) continue; + if ( tag.permissions?.some(perm => perms.includes(perm)) || (tag.condition?.(message!, user, channel)) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 974758e..44d13b5 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -422,6 +422,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "Av32000", id: 593436735380127770n, }, + Noxillio: { + name: "Noxillio", + id: 138616536502894592n, + }, Kyuuhachi: { name: "Kyuuhachi", id: 236588665420251137n,