1.0.0 • Published 10 years ago
hubot-line-message v1.0.0
hubot-line-message
Send line message via hubot
You >> hubot line Boss Our office is on fire!!!
hubot >> Ok! send 'Our office is on fire!!!' to 'Boss'You >> hubot list line users
hubot >> Total 5 line users:
Boss
Monkey
Dog
Pig
ChickenYou >> hubot line broadcast Alert, boss is angry
hubot >> Ok! broadcast 'Alert, boss is angry'See src/line-message.coffee for full documentation.
Installation
In hubot project repo, run:
npm install hubot-line-message --save
Then add hubot-line-message to your external-scripts.json:
[
"hubot-line-message"
]Configuration
- X_LINE_CHANNELID - Your line bot's channel id
- X_LINE_CHANNELSECRET - Your line bot's channel secret
- X_LINE_TRUSTED_USER_WITH_ACL - Your line bot's mid
- LINE_USERS - Comma seperated dictionary for your line users, format:
"<username1>: <line_mid1>, <username2>: <line_mid2>, ..."
Step by step to get Line mid
In LINE Developers page, clicking
Issuebutton on the right side ofIssuing access tokens for testingCopy
curl -v -H "Authorization ..., paste in terminalGet your
midfield in respond payload
Commands:
hubot line send <user> <message> - Send line message to userhubot line broadcast <message> - Send line message to all line usershubot line list users - List all available line users