revamp help command

This commit is contained in:
SowinskiBraeden committed 2022-08-01 13:43:41 -07:00
1 parent 46707b091e
commit 51a81ad21c
2 files changed
+138 -52

No files matched your search

+132 -46
View File
@@ -4,7 +4,7 @@ module.exports = {
name: "help",
debug: false,
description: "Get information on a specific command",
usage: "[command]",
usage: "[option]",
permissions: {
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
member: [],
@@ -12,12 +12,30 @@ module.exports = {
SlashCommand: {
options: [
{
name: "command",
description: "Get information on a specific command",
value: "command",
type: 3,
required: false,
name: "commands",
description: "list all commands",
value: "commands",
type: 1,
options: [{
name: "command",
description: "Get information on a specific command",
value: "command",
type: 3,
required: false,
}]
},
{
name: "settings",
description: "how to configure the settings",
value: "settings",
type: 1,
},
{
name: "support",
description: "get support for QuarksBot",
value: "support",
type: 1,
}
],
/**
*
@@ -31,50 +49,118 @@ module.exports = {
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
return interaction.send(`You are not allowed to use the bot in this channel.`);
}
let Commands = client.commands.filter((cmd) => {
return !cmd.debug
}).map((cmd) =>
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
);
if (args[0].name == 'commands') {
let Commands = client.commands.filter((cmd) => {
return !cmd.debug
}).map((cmd) =>
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
);
let Embed = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setDescription(`${Commands.join("\n")}
let Embed = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setDescription(`${Commands.join("\n")}
QuarksBot Version: v${client.config.Version}`);
if (!args) return interaction.send(Embed);
else {
let cmd =
client.commands.get(args[0].value) ||
client.commands.find(
(x) => x.aliases && x.aliases.includes(args[0].value)
);
if (!cmd)
return client.sendTime(
interaction,
`❌ | Unable to find that command.`
);
QuarksBot Version: v${client.config.Version}`);
if (!args[0].options[0]) return interaction.send(Embed);
else {
let cmd =
client.commands.get(args[0].options[0].value) ||
client.commands.find(
(x) => x.aliases && x.aliases.includes(args[0].options[0].value)
);
if (!cmd)
return client.sendTime(
interaction,
`❌ | Unable to find that command.`
);
let embed = new MessageEmbed()
.setDescription(cmd.description)
.setColor("GREEN")
//.addField("Name", cmd.name, true)
.addField("Aliases", cmd.aliases.join(", "), true)
.addField(
"Usage",
`\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`,
true
)
.addField(
"Permissions",
"Member: " +
cmd.permissions.member.join(", ") +
"\nBot: " +
cmd.permissions.channel.join(", "),
true
);
let embed = new MessageEmbed()
.setDescription(cmd.description)
.setColor("GREEN")
.addField(
"Usage",
`\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`,
true
)
.addField(
"Permissions",
"Member: " +
cmd.permissions.member.join(", ") +
"\nBot: " +
cmd.permissions.channel.join(", "),
true
);
interaction.send(embed);
return interaction.send(embed);
}
} else if (args[0].name == 'settings') {
const settingsHelp = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setTitle('Using settings command to configure your guild')
.setDescription(`Some features of QuarksBot require, or recommend settings.
**__1. Action Channel:__**
Optionally you can have a dedicated channel for the \`/me\` command, keeping your channels clean.
Use \`/settings action_channel set [channel]\` to configure this setting.
or...
use \`/settings action_channel remove [channel]\` to remove your dedicated action channel.
**__2. Tweet Channel:__**
Optionally you can have a dedicated channel for the \`/tweet\` command, keeping your channels clean.
Use \`/settings tweet_channel set [channel]\` to configure this setting.
or ...
use \`/settings tweet_channel remove [channel]\` to remove your dedicated tweet channel.
**__3. Allowed Channels:__**
If you want to limit what channels people can use QuarksBot,
use \`/settings allowed_channels add [channel]\` to add a channel to a list of allowed channels.
or...
use \`/settings allowed_channels remove [channel]\` to remove a channel from the list of allowed channels.
**__4. Starting Balance:__**
When a user joins your server, they get a starting balance. This can be configured,
use \`/settings starting_balance [amount]\` to set the starting balance.
**__5. Income Roles:__**
The \`/work\` command required a user to have a role that has a defined income.
Use \`/settings set_income_role [role] [amount]\` to add a role to the list of roles to earn income.
or...
use \`/settings remove_income_role [role]\` to remove a role from the list of roles to earn income.
**Note:**
- Users may only use \`/work\` command once every 24 hours.
- If a user has more than one role that can earn income, the bot will pay them for the role with the highest income.
- The amount you enter for a role to earn is the amount they will be paid when using the \`/work\` command. Be sure that the amount you choose is a daily income, not hourly, etc.
**__6. Viewing Settings:__**
If you are unsure of your current configured settings, use \`/settings view\` to get a detailed view of your configurations.`);
return interaction.send({ embeds: [settingsHelp] });
} else if (args[0].name == 'support') {
const supportEmbed = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setDescription(`**__QuarksBot Support__**
Are you experiencing troubles with QuarksBot?
Do you have questions or concerns?
Do you require help to use the bot?
Do you have a feature you'd like to see?
Join the support server to have all your needs fulfilled.
╚➤ ${client.config.SupportServer}
`)
return interaction.send({ embeds: [supportEmbed] });
}
},
},
+6 -6
View File
@@ -43,9 +43,9 @@ module.exports = {
type: 1,
options: [
{
name: "add_or_remove",
description: "add/remove channel",
value: "add_or_remove",
name: "set_or_remove",
description: "set/remove channel",
value: "set_or_remove",
type: 3,
required: true,
choices: [
@@ -68,9 +68,9 @@ module.exports = {
type: 1,
options: [
{
name: "add_or_remove",
description: "add/remove channel",
value: "add_or_remove",
name: "set_or_remove",
description: "set/remove channel",
value: "set_or_remove",
type: 3,
required: true,
choices: [