mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -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');
|
const { hasFeature } = require('../../../labscore/utils/testing');
|
||||||
|
|
||||||
function createHelpPage(context, title, contents, descriptions) {
|
function createHelpPage(context, title, contents, descriptions) {
|
||||||
return {
|
return page(createEmbed("default", context, {
|
||||||
content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true),
|
description: `${title}\n\n` +
|
||||||
embeds: [createEmbed("default", context, {
|
renderCommandList(contents, descriptions) +
|
||||||
description: `${title}\n\n` +
|
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} to view more information about a command.` +
|
||||||
renderCommandList(contents, descriptions) +
|
`\n${icon("discord")} Need help with anything else? ${DISCORD_INVITES.help}`
|
||||||
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} to view more information about a command.`
|
}))
|
||||||
})
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderCommandList(commands, descriptions, limit) {
|
function renderCommandList(commands, descriptions, limit) {
|
||||||
|
@ -86,10 +83,7 @@ function createCommandPage(context, prefix, command) {
|
||||||
inline: false
|
inline: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return {
|
return page(cPage);
|
||||||
content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true),
|
|
||||||
embeds: [cPage]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// These categories will be displayed to users, add them in the correct order
|
// 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 cmds = results.map((m) => { return m.name })
|
||||||
let dscs = results.map((m) => { return m.metadata.description_short })
|
let dscs = results.map((m) => { return m.metadata.description_short })
|
||||||
pages.push({
|
pages.push(page(createEmbed("default", context, {
|
||||||
content: link(DISCORD_INVITES.invite + " ", "⠀", "labsCore Support Server", true),
|
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}`
|
||||||
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
|
// Generate command detail pages
|
||||||
for (const c of results) {
|
for (const c of results) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue