Created
June 3, 2016 14:30
-
-
Save mikechernev/51c3daf96f687cb7c866f4c9aa7d220e to your computer and use it in GitHub Desktop.
A script to send a welcome message in a specific room
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
# 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