@mtcute/dispatcher
TypeScript icon, indicating that this package has built-in type declarations

0.17.2 • Public • Published

@mtcute/dispatcher

📖 API Reference 🧐 Guide

Dispatcher and bot framework based on @mtcute/core.

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 { Dispatcher } from '@mtcute/dispatcher'

const tg = new TelegramClient({ ... })
const dp = Dispatcher.for(tg)

dp.onNewMessage(async (msg) => {
    await msg.replyText('Hello world!')
})

Readme

Keywords

none

Package Sidebar

Install

npm i @mtcute/dispatcher

Homepage

mtcute.dev

Weekly Downloads

21

Version

0.17.2

License

MIT

Unpacked Size

271 kB

Total Files

47

Last publish

Collaborators

  • teidesu