only post discord if setting active

pull/2/head
lza_menace 2 years ago
parent 75bac09fa4
commit 0ca9af8c3a

@ -258,7 +258,7 @@ class Scrape extends Collection {
writeToDatabase(q)
.then((res) => this.writeLastBlock(log.blockNumber))
.catch((err) => console.log(`Error writing to database: ${err}`));
if (checkUnsentNotif(txHash, logIndex)) {
if (process.env.DISCORD_ACTIVE == 1 && checkUnsentNotif(txHash, logIndex)) {
postDiscord(q)
.then(async res => {
await markSent(txHash, logIndex);

Loading…
Cancel
Save