revamp help command
This commit is contained in:
2 files changed
+139
-53
No files matched your search
+133
-47
@@ -4,7 +4,7 @@ module.exports = {
|
|||||||
name: "help",
|
name: "help",
|
||||||
debug: false,
|
debug: false,
|
||||||
description: "Get information on a specific command",
|
description: "Get information on a specific command",
|
||||||
usage: "[command]",
|
usage: "[option]",
|
||||||
permissions: {
|
permissions: {
|
||||||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||||
member: [],
|
member: [],
|
||||||
@@ -12,12 +12,30 @@ module.exports = {
|
|||||||
SlashCommand: {
|
SlashCommand: {
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: "command",
|
name: "commands",
|
||||||
description: "Get information on a specific command",
|
description: "list all commands",
|
||||||
value: "command",
|
value: "commands",
|
||||||
type: 3,
|
type: 1,
|
||||||
required: false,
|
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)) {
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||||
}
|
}
|
||||||
let Commands = client.commands.filter((cmd) => {
|
if (args[0].name == 'commands') {
|
||||||
return !cmd.debug
|
let Commands = client.commands.filter((cmd) => {
|
||||||
}).map((cmd) =>
|
return !cmd.debug
|
||||||
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
|
}).map((cmd) =>
|
||||||
);
|
`\`/${cmd.name}${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
|
||||||
|
);
|
||||||
let Embed = new MessageEmbed()
|
|
||||||
.setColor(client.config.EmbedColor)
|
|
||||||
.setDescription(`${Commands.join("\n")}
|
|
||||||
|
|
||||||
QuarksBot Version: v${client.config.Version}`);
|
let Embed = new MessageEmbed()
|
||||||
if (!args) return interaction.send(Embed);
|
.setColor(client.config.EmbedColor)
|
||||||
else {
|
.setDescription(`${Commands.join("\n")}
|
||||||
let cmd =
|
|
||||||
client.commands.get(args[0].value) ||
|
QuarksBot Version: v${client.config.Version}`);
|
||||||
client.commands.find(
|
if (!args[0].options[0]) return interaction.send(Embed);
|
||||||
(x) => x.aliases && x.aliases.includes(args[0].value)
|
else {
|
||||||
);
|
let cmd =
|
||||||
if (!cmd)
|
client.commands.get(args[0].options[0].value) ||
|
||||||
return client.sendTime(
|
client.commands.find(
|
||||||
interaction,
|
(x) => x.aliases && x.aliases.includes(args[0].options[0].value)
|
||||||
`❌ | Unable to find that command.`
|
);
|
||||||
);
|
if (!cmd)
|
||||||
|
return client.sendTime(
|
||||||
|
interaction,
|
||||||
|
`❌ | Unable to find that command.`
|
||||||
|
);
|
||||||
|
|
||||||
|
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
|
||||||
|
);
|
||||||
|
|
||||||
|
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...
|
||||||
|
|
||||||
let embed = new MessageEmbed()
|
use \`/settings action_channel remove [channel]\` to remove your dedicated action channel.
|
||||||
.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
|
|
||||||
);
|
|
||||||
|
|
||||||
interaction.send(embed);
|
**__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] });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ module.exports = {
|
|||||||
type: 1,
|
type: 1,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: "add_or_remove",
|
name: "set_or_remove",
|
||||||
description: "add/remove channel",
|
description: "set/remove channel",
|
||||||
value: "add_or_remove",
|
value: "set_or_remove",
|
||||||
type: 3,
|
type: 3,
|
||||||
required: true,
|
required: true,
|
||||||
choices: [
|
choices: [
|
||||||
@@ -68,9 +68,9 @@ module.exports = {
|
|||||||
type: 1,
|
type: 1,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: "add_or_remove",
|
name: "set_or_remove",
|
||||||
description: "add/remove channel",
|
description: "set/remove channel",
|
||||||
value: "add_or_remove",
|
value: "set_or_remove",
|
||||||
type: 3,
|
type: 3,
|
||||||
required: true,
|
required: true,
|
||||||
choices: [
|
choices: [
|
||||||
|
|||||||
Reference in new issue
Block a user