melod1n 810151263d feat: separate Ollama text/image/think models + add YouTube downloader
Support OLLAMA_IMAGE_MODEL and new OLLAMA_THINK_MODEL (both default to OLLAMA_MODEL)

Add /ollamathink command; validate thinking capability; disable image-analysis flow in think mode

Make /ollama-get-model show Text/Image/Think blocks only when models differ

Add /ytdl (/youtube) command + auto-detect YouTube URLs in messages

Cache downloaded videos to data/video and schedule daily cleanup

Move photo storage from data/temp to data/photo; improve env boolean parsing via ifTrue

Update deps (youtubei.js, puppeteer*) and TS config (allowJs, allowSyntheticDefaultImports)
2026-01-31 19:37:25 +03:00
2026-01-27 19:44:50 +03:00
2026-01-28 05:22:32 +02:00
2021-02-27 15:26:09 +03:00
2026-01-28 05:22:32 +02:00
2026-01-28 17:13:38 +03:00
2026-01-12 16:11:03 +03:00
2026-01-12 16:09:22 +03:00
2021-02-27 15:26:09 +03:00
2026-01-28 05:22:32 +02:00
2026-01-12 16:09:22 +03:00

Telegram Chat Bot

Bot for Telegram with a lot of commands and AI (Ollama/Gemini/Mistral) written in TypeScript + NodeJS/Bun runtime + Drizzle ORM (SQLite DB)

Quick Start

cp .env.example .env
# Edit .env: add BOT_TOKEN, CREATOR_ID and configure optional AI models (GEMINI_API_KEY, MISTRAL_API_KEY, OLLAMA_ADDRESS)

With Bun (Recommended):

bun install
bunx drizzle-kit generate && bunx drizzle-kit migrate
bun run build && bun start

With Node.js:

npm install
npx drizzle-kit generate && npx drizzle-kit migrate
npm run build && npm start

With Docker Compose:

docker compose up -d

With Docker:

docker build -f Dockerfile -t tg-bot .
docker run -d --env-file .env -v $(pwd)/data:/config/data tg-bot

With Docker (Bun):

docker build -f Dockerfile-bun -t tg-bot-bun .
docker run -d --env-file .env -v $(pwd)/data:/config/data tg-bot-bun

Requirements

  • Node.js >= 18 OR Bun >= 1.0
  • Docker (optional)

Features

  • AI chat (Gemini, Mistral, Ollama)
  • Custom answers and commands
  • Admin management
  • User blocking (mute/unmute)
  • QR code generation
  • System info
  • And more...
S
Description
Bot for Telegram with a lot of commands and AI (Ollama/Gemini/Mistral) written in TypeScript + NodeJS/Bun runtime + Drizzle ORM (SQLite DB)
Readme GPL-3.0 3.6 MiB
Languages
TypeScript 99.8%
Dockerfile 0.2%