work-roles command

This commit is contained in:
SowinskiBraeden committed 2022-07-29 16:20:32 -07:00
1 parent 5f051a15e0
commit 2d25bb7167
1 file changed
+41
+41
View File
@@ -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] })
},
},
}