From 16ccd9296708d5fb09587dfbe58d7773064a0b28 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sat, 30 Mar 2024 12:25:02 +0100 Subject: [PATCH] try mkt --- commands/message/core/help.js | 25 +++++++++++++++++-------- labscore/constants.js | 3 ++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/commands/message/core/help.js b/commands/message/core/help.js index 921f5d5..c556987 100644 --- a/commands/message/core/help.js +++ b/commands/message/core/help.js @@ -10,11 +10,15 @@ const { Permissions } = require("detritus-client/lib/constants"); const { hasFeature } = require('../../../labscore/utils/testing'); function createHelpPage(context, title, contents, descriptions) { - 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.` - })) + 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.` + }) + ] + } } function renderCommandList(commands, descriptions, limit) { @@ -82,7 +86,10 @@ function createCommandPage(context, prefix, command) { inline: false }) } - return page(cPage); + return { + content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true), + embeds: [cPage] + }; } // These categories will be displayed to users, add them in the correct order @@ -146,9 +153,11 @@ module.exports = { let cmds = results.map((m) => { return m.name }) let dscs = results.map((m) => { return m.metadata.description_short }) - pages.push(page(createEmbed("default", context, { + 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")}.` - }))) + })]}) // Generate command detail pages for (const c of results) { diff --git a/labscore/constants.js b/labscore/constants.js index d22ce23..91b6f75 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -1,7 +1,8 @@ module.exports.DISCORD_INVITES = Object.freeze({ support: "https://discord.gg/8c4p6xcjru", privacy: "https://discord.gg/sQs8FhcTGh", - invite: "https://discord.gg/cHd28DrM7f" + invite: "https://discord.gg/cHd28DrM7f", + help: "https://discord.gg/xQNBB3WFne" }) module.exports.DEFAULT_BOT_NAME = 'labsCore'