We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27143cf commit 189d6d5Copy full SHA for 189d6d5
1 file changed
bots/gsc-report/main.js
@@ -47,7 +47,11 @@ async function getSearchPerformance() {
47
}
48
49
async function sendToDiscord(data) {
50
- const webhook = new WebhookClient({ url: process.env.WEBHOOK_URL });
+ const url = process.env.WEBHOOK_URL;
51
+ if (!url) {
52
+ throw new Error('WEBHOOK_URL environment variable is not set');
53
+ }
54
+ const webhook = new WebhookClient({ url });
55
56
const fields = Object.entries(data)
57
.filter(([sub, stats]) => stats.clicks > 0)
0 commit comments