Skip to content

Commit

Permalink
added audio thumbnail to store command
Browse files Browse the repository at this point in the history
  • Loading branch information
StarManTheGamer committed Jul 20, 2023
1 parent 9b4dbec commit 62b436c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ export async function store (message: Message, args: string[]) {
return message.channel.send(errResult.displayText)
}

let thumbnailURL = data.thumbnail

if (data.type.toLowerCase() === 'audio') {
thumbnailURL = 'https://c0.ptacdn.com/static/images/placeholders/audio.88cff071.png'
}

const embed = new MessageEmbed({
title: data.name + ' ' + (data.isLimited === true ? emojiUtils.star : ''),
description: data.description === '' ? 'No description set.' : data.description,
url: `https://polytoria.com/store/${data.id}`,
thumbnail: {
url: `${data.thumbnail}`
url: thumbnailURL
},
color: '#ff5454',
fields: [
Expand Down

0 comments on commit 62b436c

Please sign in to comment.