MCPcopy Index your code
hub / github.com/Borodutch/telegram-bot-starter

github.com/Borodutch/telegram-bot-starter @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
15 symbols 57 edges 13 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Telegram bot starter based on grammY

Please, enjoy this starter template for Telegram bots based on grammY. It includes most common middlewares, MongoDB integration, language picker and internationalization and shows basic encapsulation techniques used by me.

Installation and local launch

  1. Clone this repo: git clone https://github.com/Borodutch/telegram-bot-starter
  2. Launch the mongo database locally
  3. Create .env with the environment variables listed below
  4. Run yarn in the root folder
  5. Run yarn develop

And you should be good to go! Feel free to fork and submit pull requests. Thanks!

Environment variables

  • TOKEN — Telegram bot token
  • MONGO — URL of the mongo database

Also, please, consider looking at .env.sample.

License

MIT — use for any purpose. Would be great if you could leave a note about the original developers. Thanks!

Extension points exported contracts — how you extend this code

YamlWithName (Interface)
(no doc)
src/menus/language.ts

Core symbols most depended-on inside this repo

sendOptions
called by 2
src/helpers/sendOptions.ts
runApp
called by 1
src/app.ts
startMongo
called by 1
src/helpers/startMongo.ts
findOrCreateUser
called by 1
src/models/User.ts
localeFile
called by 1
src/menus/language.ts
setLanguage
called by 1
src/menus/language.ts
attachUser
called by 0
src/middlewares/attachUser.ts
configureI18n
called by 0
src/middlewares/configureI18n.ts

Shape

Function 10
Class 4
Interface 1

Languages

TypeScript100%

Modules by API surface

src/models/User.ts3 symbols
src/menus/language.ts3 symbols
src/models/Context.ts2 symbols
src/middlewares/configureI18n.ts1 symbols
src/middlewares/attachUser.ts1 symbols
src/helpers/startMongo.ts1 symbols
src/helpers/sendOptions.ts1 symbols
src/handlers/language.ts1 symbols
src/handlers/help.ts1 symbols
src/app.ts1 symbols

For agents

$ claude mcp add telegram-bot-starter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page