From 47700fce827844f132df851ffa52d2fd5511317b Mon Sep 17 00:00:00 2001 From: murm Date: Fri, 17 Mar 2023 01:42:28 -0400 Subject: [PATCH] update tags to allow for matrix html funnies --- commands/tags/tags.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/tags/tags.js b/commands/tags/tags.js index 83dd734..789322f 100644 --- a/commands/tags/tags.js +++ b/commands/tags/tags.js @@ -20,7 +20,7 @@ class TagsCommand extends Command { const result = await database.setTag(tagName, { content: this.type === "classic" ? this.args.slice(2).join(" ") : this.optionsArray[0].options[1].value, author: this.message.sender }, this.channel); this.success = true; if (result) return result; - return `The tag \`${tagName}\` has been added!`; + return { html: `The tag ${tagName} has been added!` }; } else if (cmd === "delete" || cmd === "remove") { if (!tagName || !tagName.trim()) return "You need to provide the name of the tag you want to delete!"; const getResult = await database.getTag(this.channel, tagName); @@ -29,7 +29,7 @@ class TagsCommand extends Command { if (getResult.author !== this.author && !owners.includes(this.author)) return "You don't own this tag!"; await database.removeTag(tagName, this.channel); this.success = true; - return `The tag \`${tagName}\` has been deleted!`; + return { html: `The tag ${tagName} has been deleted!` }; } else if (cmd === "edit") { if (!tagName || !tagName.trim()) return "You need to provide the name of the tag you want to edit!"; const getResult = await database.getTag(this.channel, tagName); @@ -38,7 +38,7 @@ class TagsCommand extends Command { if (getResult.author !== this.author && !owners.includes(this.author)) return "You don't own this tag!"; await database.editTag(tagName, { content: this.type === "classic" ? this.args.slice(2).join(" ") : this.optionsArray[0].options[1].value, author: this.message.sender }, this.channel); this.success = true; - return `The tag \`${tagName}\` has been edited!`; + return { html: `The tag ${tagName} has been edited!` }; } else if (cmd === "own" || cmd === "owner") { if (!tagName || !tagName.trim()) return "You need to provide the name of the tag you want to check the owner of!"; const getResult = await database.getTag(this.channel, tagName); @@ -102,7 +102,7 @@ class TagsCommand extends Command { }], }; } - return getResult.content; + return { html: getResult.content }; } }