We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c45139d commit 311484cCopy full SHA for 311484c
1 file changed
functions/billing/index.js
@@ -29,7 +29,7 @@ const {WebClient} = require('@slack/web-api');
29
const BOT_ACCESS_TOKEN =
30
process.env.BOT_ACCESS_TOKEN || 'xxxx-111111111111-abcdefghidklmnopq';
31
const CHANNEL = process.env.SLACK_CHANNEL || 'general';
32
-const web = new WebClient(BOT_ACCESS_TOKEN);
+const slackClient = new WebClient(BOT_ACCESS_TOKEN);
33
34
exports.notifySlack = async pubsubEvent => {
35
const pubsubAttrs = pubsubEvent.attributes;
@@ -38,7 +38,7 @@ exports.notifySlack = async pubsubEvent => {
38
pubsubAttrs
39
)}, ${pubsubData}`;
40
41
- await web.chat.postMessage({
+ await slackClient.chat.postMessage({
42
channel: CHANNEL,
43
text: budgetNotificationText,
44
});
0 commit comments