update help settings
This commit is contained in:
5 files changed
+171
-78
No files matched your search
+31
-48
@@ -1,4 +1,5 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
const { EmbedBuilder, ActionRowBuilder, SelectMenuBuilder } = require("discord.js");
|
||||
const settings = require('../config/settingsHelp');
|
||||
|
||||
module.exports = {
|
||||
name: "help",
|
||||
@@ -109,58 +110,40 @@ module.exports = {
|
||||
return interaction.send(embed);
|
||||
}
|
||||
} else if (args[0].name == 'settings') {
|
||||
const settingsHelp = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
.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 settingsMenu = new SelectMenuBuilder()
|
||||
.setCustomId(`settingSelect-${interaction.member.user.id}`)
|
||||
.setPlaceholder('Select Setting you require help with')
|
||||
|
||||
use \`/settings action_channel remove [channel]\` to remove your dedicated action channel.
|
||||
settings.settings.map((setting) => {
|
||||
settingsMenu.addOptions({
|
||||
label: setting.name,
|
||||
description: 'Get help with this setting',
|
||||
value: setting.name,
|
||||
})
|
||||
})
|
||||
|
||||
const SelectSettings = new ActionRowBuilder().addComponents(settingsMenu);
|
||||
|
||||
**__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...
|
||||
interaction.send({ components: [SelectSettings], flags: (1 << 6) });
|
||||
|
||||
use \`/settings allowed_channels remove [channel]\` to remove a channel from the list of allowed channels.
|
||||
client.on("interactionCreate", async MenuInteraction => {
|
||||
if(!MenuInteraction.isSelectMenu()) return;
|
||||
if (!MenuInteraction.customId.endsWith(MenuInteraction.member.user.id)) {
|
||||
return MenuInteraction.reply({
|
||||
content: "This button is not for you",
|
||||
flags: (1 << 6)
|
||||
})
|
||||
}
|
||||
|
||||
**__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] });
|
||||
const setting = settings.settings.find(setting => setting.name === MenuInteraction.values[0]);
|
||||
const settingEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
.setTitle(setting.name)
|
||||
.setDescription(setting.description)
|
||||
|
||||
return MenuInteraction.update({ embeds: [settingEmbed], components: [] });
|
||||
});
|
||||
|
||||
} else if (args[0].name == 'support') {
|
||||
const supportEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
|
||||
Reference in new issue
Block a user