feat(discord): dynamic currency symbol (#1328)

This commit is contained in:
sohaiiil
2020-12-12 14:01:54 +00:00
committed by GitHub
parent ad0b2fe525
commit cccfde245a
91 changed files with 99 additions and 5 deletions
+6 -1
View File
@@ -37,7 +37,12 @@ export function sendDiscordMessage(link: Link, store: Store) {
.setTimestamp();
embed.addField('Store', store.name, true);
if (link.price) embed.addField('Price', `$${link.price}`, true);
if (link.price)
embed.addField(
'Price',
`${store.currency}${link.price}`,
true
);
embed.addField('Product Page', link.url);
if (link.cartUrl) embed.addField('Add to Cart', link.cartUrl);
embed.addField('Brand', link.brand, true);
+2 -2
View File
@@ -18,12 +18,12 @@ import {sendTwitchMessage} from './twitch';
export function sendNotification(link: Link, store: Store) {
// Priority
playSound();
sendDiscordMessage(link, store);
sendDesktopNotification(link, store);
sendEmail(link, store);
sendSms(link, store);
sendDesktopNotification(link, store);
// Non-priority
adjustPhilipsHueLights();
sendDiscordMessage(link, store);
sendMqttMessage(link, store);
sendPagerDutyNotification(link, store);
sendPushbulletNotification(link, store);