- Use Azure Functions v3 Model (which is supported by Grammy)
- Note: Due to Grammy
webhookCallback
only support with Azure Functions v3 Model, so we need to use this model.
- Note: Due to Grammy
- Setup with Grammy (Telegram Bot Framework)
- Type Support from Nammatham Framework
- Create bot at BotFather
- Create
.env
file and addBOT_TOKEN
to the file - Install dependencies
npm install
- Use public URL from ngrok or localtunnel to setup webhook
- Setup webhook
curl https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=<WEBHOOK_URL>
- Start the bot
npm run dev
npm run dev
npm run build
npm run build
func azure functionapp publish <functionAppName>
when you deploy to Azure Functions, you need to setup webhook again with the new URL
Please read the full documentation in the repo
- Thada Wangthammang, Software Engineer, Thailand