Skip to content

Instantly share code, notes, and snippets.

@Jack-Valentine
Last active January 5, 2016 06:16
Show Gist options
  • Save Jack-Valentine/28d385a68dddc1064f3a to your computer and use it in GitHub Desktop.
Save Jack-Valentine/28d385a68dddc1064f3a to your computer and use it in GitHub Desktop.
Send to "Morning Mornig" message in your slack channel.
import time
from slackclient import SlackClient
Token = 'token' #You must input your token key.
Chan = "C0XXXXXX" #You must input your slack channel code.
Text = "Test" #Input your text.
sc = SlackClient(Token)
if sc.rtm_connect():
while True:
print("send")
sc.rtm_send_message(Chan, Text)
time.sleep(0.01)
else:
print ("Connection Failed, invalid token?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment