bottender telegram webhook set -w https://telegram-builder-hfkjvkdxrm.now.sh
Download this example or clone bottender.
curl https://codeload.github.com/Yoctol/bottender/tar.gz/master | tar -xz --strip=2 bottender-master/examples/telegram-builder
cd telegram-builder
Install dependencies:
npm install
You must put accessToken
into bottender.config.js
.
After that, you can run the bot with this npm script:
npm run dev
This command will start server for bot developing at http://localhost:5000
.
While the server running, you can run following command with global bottender
to set up the webhook:
bottender telegram webhook set -w <YOUR_WEBHOOK_URL>
If you want to expose the server on your local development machine and get a secure URL, ngrok or localtunnel may be good tools for you.
Note: You must put
accessToken
intobottender.config.js
before running this command.
This example shows how to combine
Handler
with
Telegram bot.
For more information, check our Telegram guides.