better help command & capitalize descriptions

This commit is contained in:
SowinskiBraeden committed 2022-08-02 13:25:28 -07:00
1 parent 2e8ef10348
commit 4d713b9d5e
8 files changed
+84 -69

No files matched your search

+26 -11
View File
@@ -13,7 +13,7 @@ module.exports = {
options: [
{
name: "commands",
description: "list all commands",
description: "List all commands",
value: "commands",
type: 1,
options: [{
@@ -26,13 +26,13 @@ module.exports = {
},
{
name: "settings",
description: "how to configure the settings",
description: "How to configure the settings",
value: "settings",
type: 1,
},
{
name: "support",
description: "get support for QuarksBot",
description: "Get support for QuarksBot",
value: "support",
type: 1,
},
@@ -88,14 +88,29 @@ module.exports = {
`\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`,
true
)
.addField(
"Permissions",
"Member: " +
cmd.permissions.member.join(", ") +
"\nBot: " +
cmd.permissions.channel.join(", "),
true
);
for (let i = 0; i < cmd.SlashCommand.options.length; i++) {
if (cmd.SlashCommand.options[i].type == 1) {
let param = cmd.SlashCommand.options[i].options.length > 0 ? ' ' : '';
for (let j = 0; j < cmd.SlashCommand.options[i].options.length; j++) {
if (cmd.SlashCommand.options[i].options[j].required) param += `[${cmd.SlashCommand.options[i].options[j].name}] `
}
embed.addField(
`/${cmd.name} ${cmd.SlashCommand.options[i].name}${param}`,
`${cmd.SlashCommand.options[i].description}`,
true
)
}
}
embed.addField(
"Permissions",
"Member: " +
cmd.permissions.member.join(", ") +
"\nBot: " +
cmd.permissions.channel.join(", "),
true
);
return interaction.send(embed);
}