Skip to content

Instantly share code, notes, and snippets.

@deslee
Last active June 16, 2018 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deslee/a474c17f17a57940f4ad20fe8824a63d to your computer and use it in GitHub Desktop.
Save deslee/a474c17f17a57940f4ad20fe8824a63d to your computer and use it in GitHub Desktop.
import { WebClient } from '@slack/client'
postMessage(teamData: TeamData, channel: string, text: string): Promise<any> {
const web = new WebClient(teamData.bot.bot_access_token);
return web.chat.postMessage({
channel: channel.substring(2, channel.length-1),
text: text
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment