Created
April 8, 2015 04:32
-
-
Save kiris/47175177c8fe6409a4b8 to your computer and use it in GitHub Desktop.
Slackの新しいチャンネルが出来たらHubotに通知させる
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: | |
# notify create channel on Slack in #new_channels | |
# | |
# Notes: | |
# required [email protected]+ | |
# | |
# Author: | |
# kiris | |
module.exports = (robot) -> | |
slack = robot.adapter.client | |
slack.on 'raw_message', (message) -> | |
if message?.type == 'channel_created' | |
return if typeof robot?.send isnt 'function' | |
robot.send {room: "new_channels"}, "新しいチャンネル <##{message.channel.id}> が作られたみたいだお" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment