-
Notifications
You must be signed in to change notification settings - Fork 2
Receiving Updates
Alper Kürşat edited this page Feb 14, 2022
·
1 revision
You have to create a telegram client and bind to Botocrat application. Botocrat has @botocrat/telegram package to create clients.
//client.js
import { createClient } from "@botocrat/telegram"
const client = createClient({
token: TELEGRAM_BOT_TOKEN,
debug: (error) => console.log(error)
})Then you can use poller or webhook to get updates.
- Receiving Updates by Polling suggested for development.
- Receiving Updates by Webhook suggested for production.