Rocket.Chat attachment like Slack.
npm install -S hubot-rocketchat-attachment
And then add hubot-rocketchat-attachment to external-scripts.json.
HUBOT_ROCKETCHAT_INCOMING_WEBHOOK=INCOMING-WEBHOOK-URL bin/hubot -a rocketchat
Let see this page.
robot.emit('rocketchat.attachment', {
content: {
text: 'content text',
attachments: [
{
text: 'attachment text',
fields: [{
title: 'Field title',
value: 'Field value'
}]
}
]
},
channel: '#general',
username: '...',
icon_url: '...',
icon_emoji: '...'
})
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT