diff --git a/src/commands/inventory.ts b/src/commands/inventory.ts index 3ef8351..b8cf6b4 100644 --- a/src/commands/inventory.ts +++ b/src/commands/inventory.ts @@ -21,7 +21,7 @@ export default { .where('user', member.user.id); // kind of stupid kind of awful - const items = (await Promise.all(itemsList.map(async i => ({item: await getItem(i.item), quantity: i.quantity})))).filter(i => i.item); + const items = (await Promise.all(itemsList.map(async i => ({item: await getItem(i.item), quantity: i.quantity})))).filter(i => i.item && i.quantity !== 0); await interaction.followUp( `Your inventory:\n${items.length === 0 ? '_Your inventory is empty!_' : items.map(i => `- ${formatItems(i.item!, i.quantity)}\n_${i.item!.description}_`).join('\n')}`