From 09d3106d0e8384d51523059d4d6aa5c62e97e557 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sat, 30 Mar 2024 20:13:56 +0100 Subject: [PATCH] surface mkt differently --- commands/message/core/help.js | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/commands/message/core/help.js b/commands/message/core/help.js index c556987..702ce6d 100644 --- a/commands/message/core/help.js +++ b/commands/message/core/help.js @@ -10,15 +10,12 @@ const { Permissions } = require("detritus-client/lib/constants"); const { hasFeature } = require('../../../labscore/utils/testing'); function createHelpPage(context, title, contents, descriptions) { - return { - content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true), - embeds: [createEmbed("default", context, { - description: `${title}\n\n` + - renderCommandList(contents, descriptions) + - `\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help `)} to view more information about a command.` - }) - ] - } + return page(createEmbed("default", context, { + description: `${title}\n\n` + + renderCommandList(contents, descriptions) + + `\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help `)} to view more information about a command.` + + `\n${icon("discord")} Need help with anything else? ${DISCORD_INVITES.help}` + })) } function renderCommandList(commands, descriptions, limit) { @@ -86,10 +83,7 @@ function createCommandPage(context, prefix, command) { inline: false }) } - return { - content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true), - embeds: [cPage] - }; + return page(cPage); } // These categories will be displayed to users, add them in the correct order @@ -153,11 +147,9 @@ module.exports = { let cmds = results.map((m) => { return m.name }) let dscs = results.map((m) => { return m.metadata.description_short }) - pages.push({ - content: link(DISCORD_INVITES.invite + " ", "⠀", "labsCore Support Server", true), - embeds: [createEmbed("default", context, { - description: `Check the pages for full command details.\n\n` + renderCommandList(cmds, dscs, 15) + `\n\n${icon("question")} Need help with something else? Contact us via our ${link(DISCORD_INVITES.support, "Support Server")}.` - })]}) + pages.push(page(createEmbed("default", context, { + description: `Check the pages for full command details.\n\n` + renderCommandList(cmds, dscs, 15) + `\n\n${icon("discord")} Need help with anything else? ${DISCORD_INVITES.support}` + }))) // Generate command detail pages for (const c of results) {