Skip to content

Instantly share code, notes, and snippets.

View mboveiri's full-sized avatar
:octocat:
Happy Coding.

Mehdi mboveiri

:octocat:
Happy Coding.
View GitHub Profile
@unnikked
unnikked / botscheduler.js
Last active July 24, 2021 00:29
Bot scheduler for Telegram - to use with IFTTT - please check https://unnikked.ga/build-telegram-bot-hook-io/ for instructions
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({