Skip to content

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.

Clone this wiki locally