This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SLACK_KEY = 'myslackkey' # Your bot's Slack key | |
BOT_ID = 'mybotid' # Your bot's Slack ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, time | |
from slackclient import SlackClient | |
SLACK_KEY = 'myslackkey' # Your bot's Slack key | |
BOT_ID = 'mybotid' # Your bot's Slack ID | |
READ_WEBSOCKET_DELAY = 1 # Delay in seconds between reading from firehose | |
def handle_question(question, channel, bot, slack_client): | |
slack_client.api_call("chat.postMessage", channel=channel, | |
text="Hello!", as_user=True) |
NewerOlder