Skip to content

Commit

Permalink
Hide Sales + Price if audio/decal/mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
StarManTheGamer committed Jul 20, 2023
1 parent fef268a commit 9b4dbec
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/commands/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ export async function store (message: Message, args: string[]) {
value: creator.name,
inline: true
},
{
name: 'Created At',
value: dateUtils.atomTimeToDisplayTime(data.createdAt),
inline: true
}
]
})

const assetType = data.type.toLowerCase()
if (!['audio', 'decal', 'mesh'].includes(assetType)) {
embed.fields.push(
{
name: 'Price',
value: data.price.toString(),
Expand All @@ -42,14 +53,9 @@ export async function store (message: Message, args: string[]) {
name: 'Sales',
value: data.sales.toString(),
inline: true
},
{
name: 'Created At',
value: dateUtils.atomTimeToDisplayTime(data.createdAt),
inline: true
}
]
})
)
}

return message.channel.send({
embeds: [embed]
Expand Down

0 comments on commit 9b4dbec

Please sign in to comment.