dynamic feedback

This commit is contained in:
SowinskiBraeden committed 2022-07-04 22:46:41 -07:00
1 parent 553d9d8a8c
commit 356fcb6b91
2 files changed
+18 -10

No files matched your search

+12 -2
View File
@@ -1,5 +1,7 @@
const { MessageEmbed } = require('discord.js');
const actions = ["picked up", "grabbed", "got", "aquired"];
module.exports = {
name: "inventory-add",
description: "add item to inventory",
@@ -130,7 +132,11 @@ module.exports = {
return interaction.send({ embeds: [embed] });
}
return interaction.send(`Added ${firearm.weaponType} to inventory`);
let message = new MessageEmbed()
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${firearm.weaponType}`)
.setColor(client.config.EmbedColor);
return interaction.send({ embeds: [message] });
});
} else {
@@ -152,7 +158,11 @@ module.exports = {
return interaction.send({ embeds: [embed] });
}
return interaction.send(`Added ${item.name} to inventory`);
let message = new MessageEmbed()
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${item.name}`)
.setColor(client.config.EmbedColor);
return interaction.send({ embeds: [message] });
});
}
},