Skip to content

Instantly share code, notes, and snippets.

@mikechernev
Created June 3, 2016 14:30
Show Gist options
  • Save mikechernev/51c3daf96f687cb7c866f4c9aa7d220e to your computer and use it in GitHub Desktop.
Save mikechernev/51c3daf96f687cb7c866f4c9aa7d220e to your computer and use it in GitHub Desktop.
A script to send a welcome message in a specific room
# Description:
# Shows a welcome message in a specific room
#
# Dependencies:
# None
#
# Configuration:
# none
#
# Commands:
# none
#
# Author:
# mikechernev
welcomeRoom = process.env.WELCOME_ROOM or 'general'
welcomeMessage = process.env.WELCOM_MSG or 'Welcome :)'
module.exports = (robot) ->
robot.enter (bot) ->
bot.reply welcomeMessage if bot.message.room == welcomeRoom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment