alina sireneva
690948b8b1
All checks were successful
Build and deploy typedoc / build (push) Successful in 5m15s
Co-authored-by: Kamilla 'ova <me@kamillaova.dev> Co-authored-by: Alina Chebakova <chebakov05@gmail.com> Co-authored-by: Kravets <57632712+kravetsone@users.noreply.github.com> Co-authored-by: starkow <hello@starkow.dev> Co-authored-by: sireneva <150665887+sireneva@users.noreply.github.com>
521 B
Executable file
521 B
Executable file
Introduction
We've already briefly touched on what Dispatcher is, but as a quick reminder: Dispatcher is a class that processes updates from the client and dispatches them to the registered handlers.
It is implemented in @mtcute/dispatcher
package
Setting up
To use a dispatcher, you need to first create a bound dispatcher
using Dispatcher.for
method:
import { Dispatcher } from '@mtcute/dispatcher'
const tg = new TelegramClient({...})
const dp = Dispatcher.for(tg)