work-roles command
This commit is contained in:
1 file changed
+41
@@ -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] })
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user