redundancy check
This commit is contained in:
1 file changed
+18
-10
+18
-10
@@ -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] })
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user