mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
try mkt
This commit is contained in:
parent
d3860115b3
commit
16ccd92967
2 changed files with 19 additions and 9 deletions
|
@ -10,11 +10,15 @@ 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 page(createEmbed("default", context, {
|
return {
|
||||||
description: `${title}\n\n` +
|
content: link(DISCORD_INVITES.help + " ", "⠀", "labsCore Support Server", true),
|
||||||
renderCommandList(contents, descriptions) +
|
embeds: [createEmbed("default", context, {
|
||||||
`\n\n${icon("question")} Use ${smallPill(`${DEFAULT_PREFIXES[0]}help <command>`)} to view more information about a command.`
|
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.`
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderCommandList(commands, descriptions, limit) {
|
function renderCommandList(commands, descriptions, limit) {
|
||||||
|
@ -82,7 +86,10 @@ function createCommandPage(context, prefix, command) {
|
||||||
inline: false
|
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
|
// 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 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(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")}.`
|
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) {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
module.exports.DISCORD_INVITES = Object.freeze({
|
module.exports.DISCORD_INVITES = Object.freeze({
|
||||||
support: "https://discord.gg/8c4p6xcjru",
|
support: "https://discord.gg/8c4p6xcjru",
|
||||||
privacy: "https://discord.gg/sQs8FhcTGh",
|
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'
|
module.exports.DEFAULT_BOT_NAME = 'labsCore'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue