debugging

This commit is contained in:
SowinskiBraeden committed 2022-08-03 18:32:52 -07:00
1 parent 83bb4edd7d
commit a1f6a8e531
3 files changed
+26 -25

No files matched your search

+5 -4
View File
@@ -1,6 +1,6 @@
const { MessageEmbed } = require('discord.js');
const action = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take possesssion of'];
const actions = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take possesssion of'];
module.exports = {
name: "inventory-add",
@@ -130,7 +130,8 @@ module.exports = {
type: 'firearm',
weaponType: args[0].options[0].value,
serial: args[0].options[1].value,
ownerName: args[0].options[2].value
ownerName: args[0].options[2].value,
description: args[0].options[3].value
}
client.dbo.collection('inventories').updateOne({'inventory.userID': interaction.member.user.id}, {$push: {'inventory.items': firearm}}, function(err, res) {
@@ -145,7 +146,7 @@ module.exports = {
});
let message = new MessageEmbed()
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${firearm.weaponType}`)
.setTitle(`You ${actions[Math.floor(Math.random() * actions.length)]} a ${firearm.weaponType}`)
.setColor(client.config.EmbedColor);
return interaction.send({ embeds: [message] });
@@ -171,7 +172,7 @@ module.exports = {
});
let message = new MessageEmbed()
.setTitle(`You ${action[Math.floor(Math.random() * actions.length)]} a ${item.name}`)
.setTitle(`You ${actions[Math.floor(Math.random() * actions.length)]} a ${item.name}`)
.setColor(client.config.EmbedColor);
return interaction.send({ embeds: [message] });