Apaparently tired me didn't think negatives could ever be a possibility
made a check for inventory get if we're above 0, instead of the incorrect not equal to -1 check
This commit is contained in:
parent
b2d6f19555
commit
5a47b9e6b5
2
index.js
2
index.js
|
@ -299,7 +299,7 @@ client.on("interactionCreate", async interaction => {
|
|||
user = interaction.options.getUser("user") || interaction.user;
|
||||
amount = await checkOwnedItems(interaction.options.getUser("user") || interaction.user, item);
|
||||
_item = item.charAt(0).toUpperCase() + item.slice(1)
|
||||
if (amount != -1) {
|
||||
if (amount > 0) {
|
||||
inv.push(`${config.items[item]} ${_item}: ${amount}`)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue