From ccb207abeb43b8e85f32c5c0a7a02aa33b5cdd7c Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 11 Nov 2020 23:15:10 -0500 Subject: [PATCH] feat(discord): add cart link to embed (#762) --- src/notification/discord.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/notification/discord.ts b/src/notification/discord.ts index ee1fc79..880bb9b 100644 --- a/src/notification/discord.ts +++ b/src/notification/discord.ts @@ -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);