Skip to content

Instantly share code, notes, and snippets.

@AaronCQL
Last active August 14, 2019 13:08
Show Gist options
  • Select an option

  • Save AaronCQL/b3580f481e0783b970e7cb4c425a23e7 to your computer and use it in GitHub Desktop.

Select an option

Save AaronCQL/b3580f481e0783b970e7cb4c425a23e7 to your computer and use it in GitHub Desktop.
const Telegraf = require('telegraf');
const functions = require('firebase-functions');
const bot = new Telegraf(functions.config().telegrambot.key);
bot.hears('hi', (ctx) => ctx.reply('Hey there'));
bot.launch();
exports.bot = functions.https.onRequest((req, res) => {
bot.handleUpdate(req.body, res);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment