Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (command === newdolls) {
- //IMPORTANT:
- var newGunCount = 7;
- //UPDATE ^THIS^ WITH EACH NEW SET OF GUNS ADDED
- fs.readFile('../newdolls.json', (err, data) => {
- if (err) throw err;
- let dict = JSON.parse(data);
- for (var i = 0; i < newGunCount; i++) {
- let colorVar = "ffffff";
- let starVar = ":star::star:";
- if (dict[i].RARITY === 3) {
- colorVar = "6bdfce";
- starVar = ":star::star::star:";
- }
- else if (dict[i].RARITY === 4) {
- colorVar = "d6e35a";
- starVar = ":star::star::star::star:";
- }
- else if (dict[i].RARITY === 5) {
- colorVar = "ffb600";
- starVar = ":star::star::star::star::star:";
- }
- let embed = new Discord.RichEmbed()
- .setColor(colorVar)
- .addField("Gun Name:", dict[i].NAME, true)
- .addField("Rarity:", starVar, true)
- .addField("Type:", dict[i].TYPE, true)
- .setImage(dict[i].IMAGE);
- message.channel.send(embed);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement