A Node.js Boilerplate for a Telegram Bot App that exposes its functionality only to approved users. It leverages the Telegraf libary and uses Google Firestore for storing the persistent data. It is ready to be deployed on Google Cloud Run (GCR).
npm install dotenv telegraf @google-cloud/firestore
Since the domain where the app will run in GCR is not known before the first deployement, the bot will not successfully launch. You can avoid this by:
- commenting the
bot.launch(...)
section - uncommenting the the dummy express server section
const express = require('express') ...
- installing express as dependency using
npm install express
→ 💡 Don't forget to revert your changes and to uninstall express once your GCR app url is known.