New Telegram chatbots should use the AWS Lambda functions: https://github.com/urbanriskmap/cognicity-reports-telegram-lambda
Telegram support for CogniCity 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 :
/report
issue report card in English/laporan
issue report card in Indonesian/start
issue initial text in Indonesian
-
For India:
/flood
issue flood report card in English/start
issue initial text in English