Skip to content

Instantly share code, notes, and snippets.

Anthony Gore anthonygore

Block or report user

Report or block anthonygore

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anthonygore
anthonygore / slack.js
Last active Aug 12, 2017
Send users a welcome message (IM) from the slackbot when they join your Slack team. Uses https://github.com/smallwins/slack so look at that first. Load this somewhere in a running Node JS app.
View slack.js
var slack = require('slack');
var bot = slack.rtm.client();
var token = "your_slack_token";
bot.team_join(function(obj) {
console.log("Team join triggered");
slack.chat.postMessage(
{
token: token,
channel: obj.user.id,
You can’t perform that action at this time.