https://github.com/core-euler/nax_bot
https://github.com/core-euler/nax_bot
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/core-euler/nax_bot
- Owner: core-euler
- Created: 2026-02-22T16:12:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-05-23T09:58:36.000Z (28 days ago)
- Last Synced: 2026-05-23T11:36:46.972Z (28 days ago)
- Language: Python
- Size: 41 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Porfiriy Telegram Bot
A Telegram bot for private group chats built with `aiogram` and CometAPI.
## Features
- Responds to `/nax` (text after command or message reply target).
- Manual web search with `/find `.
- Chat binding from private chat (`/start` -> "Bind chat" flow) and `/bind` inside group.
- Daily classic digest at `18:00` (default timezone: `Europe/Moscow`).
- Daily web digest at `12:00`: extracts hot themes from chat and adds web-based context.
- Stores chat bindings and message logs locally.
## Environment Variables (`.env`)
Required:
- `BOT_TOKEN=`
- `COMET_API_TOKEN=`
Optional:
- `TZ=Europe/Moscow`
- `COMET_MODEL=gpt-5.1`
- `ALLOWED_CHAT_IDS=` (comma-separated, for example `-100123,-100456`)
- `BOT_COOLDOWN_SECONDS=20`
- `HUMOR_MODE=hard` (`soft|hard|insane`)
- `WEB_DIGEST_HOUR=12`
- `WEB_DIGEST_MINUTE=0`
## Run
```bash
docker compose up -d --build
```
## CI/CD (GitHub Actions)
- `CI` ([`.github/workflows/ci.yml`](/Users/core/code/nax_bot/.github/workflows/ci.yml)): runs on every push/PR, installs dependencies, and validates syntax (`python -m compileall app`).
- `CD` ([`.github/workflows/cd.yml`](/Users/core/code/nax_bot/.github/workflows/cd.yml)): runs on push to `main`, builds and publishes Docker image to `ghcr.io//`.
- Optional SSH deployment: if deploy secrets are present, the workflow updates the server and runs `docker compose up -d --build`.
## Deploy Secrets (Optional)
- `DEPLOY_HOST`
- `DEPLOY_USER`
- `DEPLOY_SSH_KEY`
- `DEPLOY_PATH`
- `DEPLOY_PORT` (optional, default `22`)
## Data Files
- `data/chats.json` - bound chats metadata
- `data/messages.jsonl` - message log