Set BOT_TOKEN
and BOT_URL
secrets, BOT_URL
being the handler of the bot function.
Set BOT_TOKEN
.
yarn install
yarn dev
This starts a public live session of Netlify Dev. More info.
https://api.telegram.org/bot{your-bot-api-token}/setWebhook?url={netlify-live-url}/.netlify/functions/bot
Go to above url in your browser and replace the token and the url. This tells the bot to call your dev instance instead of the live one.
git push
to this repo starts the build process on Netlify and a GitHub action takes care of setting the bot's webhook url