mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
surface mkt differently
This commit is contained in:
parent
16ccd92967
commit
09d3106d0e
1 changed files with 10 additions and 18 deletions
|
@ -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, {
|
||||
return page(createEmbed("default", context, {
|
||||
description: `${title}\n\n` +
|
||||
renderCommandList(contents, descriptions) +
|
||||
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} to view more information about a command.`
|
||||
})
|
||||
]
|
||||
}
|
||||
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue