https://github.com/core-euler/psychotest
https://github.com/core-euler/psychotest
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/core-euler/psychotest
- Owner: core-euler
- Created: 2026-03-04T18:42:50.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-20T18:02:09.000Z (3 months ago)
- Last Synced: 2026-03-21T08:39:05.765Z (3 months ago)
- Language: Python
- Size: 25.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# psychotest bot
Telegram bot on `aiogram 3` with inline-only flow, payment webhook + manual admin fallback.
Test logic:
- 8 questions
- each question answered 2 times
- first selected option is removed before second pick
- final result = leading + secondary type from total scores
## Run locally
1. Create `.env` from `.env.example`.
2. Install dependencies:
```bash
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
```
3. Start Postgres and bot via Docker Compose:
```bash
docker compose up --build
```
Bot process starts polling and webhook server on `:8081`.
## Media files
Expected files in `bot/media/`:
- `start_cover.png`
- `masterclass_cover.png`
- `type_a.png ... type_f.png`
- `masterclass_promo.mp4` (optional in current implementation)
Current post-test sequence in code:
1. Result image + summary.
2. Two inline buttons with Telegra.ph links (leading and secondary types).
3. Placeholder message: `ТУТ БУДЕТ ВИДЕО`.
4. Timer 2 minutes.
5. Payment offer message.
6. Reminder in 1 hour if unpaid.
## Webhook endpoint
`POST /prodamus/webhook`
Payload must include `telegram_user_id` (or `user_id`) and success status (`paid/success/confirmed/succeeded`).