New Telegram chatbots should use the AWS Lambda functions: https://github.com/urbanriskmap/sitioss-reports-telegram-lambda
Telegram support for Siti OSS GRASP
npm install
- You can create a bot as instructed here
node app.js
Save a copy of sample.env as .env in local directory with appropriate credentials
BOT_TOKEN: The token required to authenticate bots and send requests to the Bot APIDEFAULT_LANG: Language codes (Used in this repo: 'en' and 'id')CARD_PATH: The frontend url to view cardsAPP: The frontend url to view mapsAPI_SERVER: The server url to receive card OTL fromX_API_KEY: The key needed to make calls to the serverPG_CON: Postgres database connection string
- grasp "username" is actually Telegram user ID or conversation ID to allow replies in conversation
- errors are logged to console, but not returned to user currently
-
For Indonesia :
/reportissue report card in English/laporanissue report card in Indonesian/startissue initial text in Indonesian
-
For India:
/floodissue flood report card in English/startissue initial text in English