Skip to content

Repository files navigation

Botocrat Framework

NodeJSnpmlast commitlicense mitvulnerabilitiesTotal alertsCode quality

Botocrat animation

Botocrat is a minimal and flexible Telegram bot framework that provides context oriented programming API along with express-like middlewares.

Botocrat has following packages you can use or replace with your own.

Package
@botocrat/telegramTelegram Bot Client
@botocrat/pollerPolls Telegram server to .getUpdates()
@botocrat/expressExpress middleware to receive updates from webhook
@botocrat/statePersistent/volatile state (stored in redis) management middleware (coming soon)

Features

Quick Start (cli)

npm exec botocrat my-telegram-bot

Quick Start (manual)

npm i @botocrat/core @botocrat/telegram @botocrat/poller --save
importBotocratfrom'@botocrat/core'importcreateClientfrom'@botocrat/telegram'importpollerfrom'@botocrat/poller'constclient=createClient({token: TELEGRAM_BOT_TOKEN})constbot=newBotocrat().get('message',(req,res)=>{res.send(`Hello ${req.from.first_name}!`)// .sent.wait(1000).reply('Thank you for choosing us')})poller(bot,client).poll()

Documentation

Read the detailed documentation on GitHub Wiki

Aq

You can ask questions on GitHub

License

MIT License

About

Botocrat is a minimal and flexible Telegram bot framework that provides context oriented programming API along with express-like middlewares.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages