const { EmbedBuilder } = require('discord.js'); module.exports = { name: "work-roles", debug: false, global: false, description: "list work roles", usage: "", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], member: [], }, options: [], SlashCommand: { /** * * @param {require("../structures/QuarksBot")} client * @param {import("discord.js").Message} message * @param {string[]} args * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }) => { if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { return interaction.send({ content: `You are not allowed to use the bot in this channel.` }); } if (GuildDB.incomeRoleStatus) { let listEmbed = new EmbedBuilder() .setColor(client.config.Colors.Default) .setTitle('List of Work Roles') let data = `` for (let i = 0; i < GuildDB.incomeRoles.length; i++) { data += `<@&${GuildDB.incomeRoles[i].role}> - $${GuildDB.incomeRoles[i].income} per day\n` } listEmbed.setDescription(data) return interaction.send({ embeds: [listEmbed] }) } else { let noRoles = new EmbedBuilder() .setColor(client.config.Colors.Default) .setDescription('**Notice:** There are no income roles') return interaction.send({ embeds: [noRoles] }); } }, }, }