Skip to content

Commit a48c010

Browse files
Ace Nassriengelke
Ace Nassri
authored andcommitted
Tweak slack sample (#1847)
1 parent fc3284d commit a48c010

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

functions/billing/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# See https://api.slack.com/docs/token-types#bot for more info
4545
BOT_ACCESS_TOKEN = 'xxxx-111111111111-abcdefghidklmnopq'
4646

47-
CHANNEL = 'general'
47+
CHANNEL_ID = 'C0XXXXXX'
4848

4949
slack_client = SlackClient(BOT_ACCESS_TOKEN)
5050

@@ -56,11 +56,10 @@ def notify_slack(data, context):
5656
notification_data = base64.b64decode(data['data']).decode('utf-8')
5757
budget_notification_text = f'{notification_attrs}, {notification_data}'
5858

59-
res = slack_client.api_call(
59+
slack_client.api_call(
6060
'chat.postMessage',
61-
channel=CHANNEL,
61+
channel=CHANNEL_ID,
6262
text=budget_notification_text)
63-
print(res)
6463
# [END functions_billing_slack]
6564

6665

0 commit comments

Comments
 (0)