Skip to content

Commit

Permalink
feat(discord): add cart link to embed (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
vp-regular committed Nov 12, 2020
1 parent 841647c commit ccb207a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/notification/discord.ts
Expand Up @@ -15,7 +15,9 @@ export function sendDiscordMessage(link: Link, store: Store) {
try {
const embed = new MessageBuilder();
embed.setTitle('Stock Notification');
embed.addField('URL', link.cartUrl ? link.cartUrl : link.url, true);
if (link.cartUrl)
embed.addField('Add To Cart Link', link.cartUrl, true);
embed.addField('Product Page', link.url, true);
embed.addField('Store', store.name, true);
embed.addField('Brand', link.brand, true);
embed.addField('Series', link.series, true);
Expand Down

0 comments on commit ccb207a

Please sign in to comment.