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
module['exports'] = function bot (hook) { | |
var request = require('request'); | |
var TOKEN = hook.env.bot_scheduler_token; | |
var ENDPOINT = 'https://api.telegram.org/bot' + TOKEN; | |
console.log(hook.params); | |
// generic handler to log api call responses | |
var handler = function (err, httpResponse, body) { | |
var response = JSON.stringify({ |