redundancy check
This commit is contained in:
1 file changed
+20
-12
+20
-12
@@ -22,20 +22,28 @@ module.exports = {
|
|||||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
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()
|
|
||||||
.setColor(client.config.EmbedColor)
|
|
||||||
.setTitle('List of Work Roles')
|
|
||||||
|
|
||||||
let data = ``
|
|
||||||
|
|
||||||
for (let i = 0; i < GuildDB.incomeRoles.length; i++) {
|
if (GuildDB.incomeRoleStatus) {
|
||||||
data += `<@&${GuildDB.incomeRoles[i].role}> - $${GuildDB.incomeRoles[i].income} per day\n`
|
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] })
|
||||||
|
} 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] })
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user