Skip to content

Instantly share code, notes, and snippets.

@ricklentz
Created July 11, 2017 22:04
Show Gist options
  • Select an option

  • Save ricklentz/772d31131c1901d8268caa5e6d071cf3 to your computer and use it in GitHub Desktop.

Select an option

Save ricklentz/772d31131c1901d8268caa5e6d071cf3 to your computer and use it in GitHub Desktop.
import os
import sys
from slackclient import SlackClient
def send_message_to_channel(message='hello, I did not override the message',channel='#systems'):
slack_token = "xoxp-12345"
sc = SlackClient(slack_token)
sc.api_call(
"chat.postMessage",
username='AI Bot',
channel=channel,
text=message
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment