redundancy check

This commit is contained in:
SowinskiBraeden committed 2022-08-01 13:07:27 -07:00
1 parent be338ece36
commit 46707b091e
1 file changed
+18 -10
+18 -10
View File
@@ -23,19 +23,27 @@ module.exports = {
return interaction.send(`You are not allowed to use the bot in this channel.`); return interaction.send(`You are not allowed to use the bot in this channel.`);
} }
let listEmbed = new MessageEmbed() if (GuildDB.incomeRoleStatus) {
.setColor(client.config.EmbedColor) let listEmbed = new MessageEmbed()
.setTitle('List of Work Roles') .setColor(client.config.EmbedColor)
.setTitle('List of Work Roles')
let data = `` let data = ``
for (let i = 0; i < GuildDB.incomeRoles.length; i++) { for (let i = 0; i < GuildDB.incomeRoles.length; i++) {
data += `<@&${GuildDB.incomeRoles[i].role}> - $${GuildDB.incomeRoles[i].income} per day\n` data += `<@&${GuildDB.incomeRoles[i].role}> - $${GuildDB.incomeRoles[i].income} per day\n`
}
listEmbed.setDescription(data)
return interaction.send({ embeds: [listEmbed] })
} else {
let noRoles = new MessageEmbed()
.setColor(client.config.EmbedColor)
.setDescription('**QuarksBot Notice:** There are no income roles')
return interaction.send({ embeds: [noRoles] });
} }
listEmbed.setDescription(data)
return interaction.send({ embeds: [listEmbed] })
}, },
}, },
} }