From 355b78a52dff17c693d4e3556bb1d52a6696a1ab Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 11 Mar 2026 05:34:41 +0100 Subject: [PATCH] MessageTags: rename to CustomCommands & fix some logic errors --- .../CreateTagModal.tsx | 3 +-- .../SettingsTagList.tsx | 2 +- .../{messageTags => customCommands}/index.ts | 21 ++++++++++--------- .../settings.ts | 6 ++++++ .../styles.css | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) rename src/plugins/{messageTags => customCommands}/CreateTagModal.tsx (98%) rename src/plugins/{messageTags => customCommands}/SettingsTagList.tsx (95%) rename src/plugins/{messageTags => customCommands}/index.ts (91%) rename src/plugins/{messageTags => customCommands}/settings.ts (83%) rename src/plugins/{messageTags => customCommands}/styles.css (86%) diff --git a/src/plugins/messageTags/CreateTagModal.tsx b/src/plugins/customCommands/CreateTagModal.tsx similarity index 98% rename from src/plugins/messageTags/CreateTagModal.tsx rename to src/plugins/customCommands/CreateTagModal.tsx index c12ec8f5..652f1850 100644 --- a/src/plugins/messageTags/CreateTagModal.tsx +++ b/src/plugins/customCommands/CreateTagModal.tsx @@ -17,7 +17,7 @@ import { Paragraph } from "@components/Paragraph"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { TextArea, TextInput, useState } from "@webpack/common"; -import { parseTagArguments, registerTagCommand } from "."; +import { parseTagArguments } from "."; import { addTag, getTag, Tag } from "./settings"; export function openCreateTagModal(initialValue: Tag = { name: "", message: "" }) { @@ -120,7 +120,6 @@ function Modal({ initialValue, modalProps }: { initialValue: Tag; modalProps: Mo onClick={() => { const tag = { name, message }; addTag(tag); - registerTagCommand(tag); modalProps.onClose(); }} disabled={!name || !message || hasReservedEphemeral} diff --git a/src/plugins/messageTags/SettingsTagList.tsx b/src/plugins/customCommands/SettingsTagList.tsx similarity index 95% rename from src/plugins/messageTags/SettingsTagList.tsx rename to src/plugins/customCommands/SettingsTagList.tsx index dd3e31b1..f79dfe4c 100644 --- a/src/plugins/messageTags/SettingsTagList.tsx +++ b/src/plugins/customCommands/SettingsTagList.tsx @@ -23,7 +23,7 @@ export function SettingsTagList() { Registered Tags {Object.values(tagsList).map(tag => ( - + {tag.name}