Skip to content

Instantly share code, notes, and snippets.

@ardianta
Created February 21, 2017 03:43
Show Gist options
  • Save ardianta/18d039ef83336779f081a3eb440a1a49 to your computer and use it in GitHub Desktop.
Save ardianta/18d039ef83336779f081a3eb440a1a49 to your computer and use it in GitHub Desktop.
Simple hookio script for telegram bot
module['exports'] = function petaniBot(hook) {
var request = require('request');
request.post('https://api.telegram.org/bot' + hook.env.token_petani_bot + '/sendMessage')
.form({
'chat_id': hook.params.message.chat.id,
'text': 'Anda mengirim: ' + hook.params.message.text
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment