diff --git a/commands/work-roles.js b/commands/work-roles.js new file mode 100644 index 0000000..1300159 --- /dev/null +++ b/commands/work-roles.js @@ -0,0 +1,41 @@ +const { MessageEmbed } = require('discord.js'); + +module.exports = { + name: "work-roles", + debug: false, + description: "list work roles", + usage: "", + permissions: { + channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], + member: [], + }, + SlashCommand: { + options: [], + /** + * + * @param {require("../structures/QuarksBot")} client + * @param {import("discord.js").MessageCreate} 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(`You are not allowed to use the bot in this channel.`); + } + + let listEmbed = new MessageEmbed() + .setColor(client.config.EmbedColor) + .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] }) + }, + }, +} \ No newline at end of file