don't show empty stacks in inventory
This commit is contained in:
parent
249cf02490
commit
0cd2b02282
|
@ -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')}`
|
||||
|
|
Loading…
Reference in New Issue