Moves the chat.postMessage REST message to a script include so that sending chats to Slack will be easier for future business rules as more features are added.
To send a message a slack message now all you have to do is include:
var response = new SlackClient().sendChat(channel, message, thread_timestamp);
channel is the slack channel ID to post the message in,
message is the text you want the bot to say,
thread_timestamp, if provided, will post the chat into the indicated thread.
Moves the chat.postMessage REST message to a script include so that sending chats to Slack will be easier for future business rules as more features are added.
To send a message a slack message now all you have to do is include:
channel is the slack channel ID to post the message in, message is the text you want the bot to say, thread_timestamp, if provided, will post the chat into the indicated thread.