From 44ea5374d2b8e1dd614a19f2065806419322dd18 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Thu, 10 Aug 2023 18:26:58 +0200 Subject: [PATCH] - update chat response to not be in a codeblock so markdown works - update disstrack footer --- commands/message/fun/chat.js | 8 +++++++- commands/message/fun/disstrack.js | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/message/fun/chat.js b/commands/message/fun/chat.js index 316c233..eae09a6 100644 --- a/commands/message/fun/chat.js +++ b/commands/message/fun/chat.js @@ -7,6 +7,8 @@ const { codeblock, iconPill } = require('../../../labscore/utils/markdown') const { Permissions } = require("detritus-client/lib/constants"); const { canUseLimitedTestCommands } = require('../utils/testing') +const { Regexes } = require('detritus-client/lib/utils/markup') +const { DiscordRegexNames } = require('detritus-client/lib/constants') module.exports = { name: 'chat', @@ -41,8 +43,12 @@ module.exports = { temperature: 0.6, model: "CHATGPT" }) + + let description = [codeblock("ansi", ["šŸ‘¤ " + format(args.text, "cyan")])] + description.push(res.body.output.substr(0, 2000 - args.text.length)) + return editOrReply(context, {embeds:[createEmbed("default", context, { - description: codeblock("ansi", ["šŸ‘¤ " + format(args.text, "cyan") + "\nšŸ¤– " + res.body.output.substr(0, 2000 - args.text.length)]), + description: description.join('\n').substr(), footer: { text: `This information may be inaccurate or biased • ${context.application.name}` } diff --git a/commands/message/fun/disstrack.js b/commands/message/fun/disstrack.js index f6663f4..d0ff5fb 100644 --- a/commands/message/fun/disstrack.js +++ b/commands/message/fun/disstrack.js @@ -37,7 +37,7 @@ module.exports = { return editOrReply(context, {embeds:[createEmbed("default", context, { description: codeblock("ansi", [res.body.output.substr(0, 2020)]), footer: { - text: `This information may be inaccurate or biased • ${context.application.name}` + text: `šŸ—£šŸ—£šŸ“¢šŸ”„šŸ”„šŸ”„šŸ”„šŸ’Æ • ${context.application.name}` } })]}) }catch(e){