Alina Sireneva
893a15d111
breaking: anonymous sender is now represented with `AnonymousSender` interface and not `string` |
||
---|---|---|
.. | ||
scripts | ||
src | ||
tests | ||
package.json | ||
README.md | ||
tsconfig.json | ||
typedoc.cjs |
@mtcute/dispatcher
📖 API Reference
🧐 Guide
Dispatcher and bot framework based on @mtcute/client.
Features
- Straightforward: Simple and expressive API
- State: Supports storing state for each chat
- Filters: Powerful and easy-to-use filtering system
- Middleware: Basic middleware support for updates
- Scenes: Built-in support for scenes
Usage
import { NodeTelegramClient, Dispatcher } from '@mtcute/node'
const tg = new NodeTelegramClient({ ... })
const dp = Dispatcher.for(tg)
dp.onNewMessage(async (msg) => {
await msg.replyText('Hello world!')
})