014
Archive 014Telegram bot

Companion

Telegram: advanced matchmaking and player profiles

telegram

Companion
01 /About

Telegram: advanced matchmaking and player profiles

02 /🧑‍💼 User profiles
  1. 01Profile registration with step-by-step Redis session
  2. 02Fields: nickname, game_id, MMR, server, reputation, verification, About, Looking for
  3. 03Profile view with computed rank by MMR
  4. 04Inline toggle for looking status (🟢/🔴)
  5. 05Own screenshots viewer (overall/season stats)
03 /✏️ Profile editing
  1. 01Inline menu to edit individual fields
  2. 02Nickname/text validation (filters)
  3. 03Daily MMR change limit (verified up to 4 times, others — 1)
  4. 04Server selection via keyboard
  5. 05Upload/replace screenshots with local storage and file_id
04 /🔍 Search & matchmaking
  1. 01MMR-based matching with expanding ranges
  2. 02Exclude already viewed (last 100 views)
  3. 03View limit per 6 hours
  4. 04Inline: Want to play, Next, Report, Menu
  5. 05Contact requests: send/accept/decline, hourly outbound limit
05 /🚨 Reports & moderation
  1. 01Report submission with preset/custom reasons
  2. 02Report session in Redis and anti-spam (24h cooldown)
  3. 03Send reports to a log channel with inline admin actions
  4. 04Admin actions from report: show profiles, message parties, warn, ban
06 /🛡️ Punishments
  1. 01Ban/unban via commands and admin panel (deactivation, reason, date)
  2. 02Auto disable search on ban
  3. 03OnlyNotBanned middleware blocks banned users
  4. 04Detailed ban log to ban_logs and main admin notification
  5. 05Warnings via admin actions from reports
07 /✅ Verification
  1. 01Verification request command
  2. 02Multi-step process with fairness confirmation and codeword
  3. 03Send requests to all admins, decision with reason
  4. 04Decision logs to channel and user notifications
08 /🛠️ Admin tools
  1. 01Admin panel: user actions (ban, verification, etc.)
  2. 02Broadcast with confirmation
  3. 03Stats/reports handlers
  4. 04View and manage reports
  5. 05Message users as admin
09 /🔒 Limits & safety
  1. 01Rate limiting: /start, search, contact requests, profile views
  2. 02Auto enabling search on starting teammate search
  3. 03Subscription/state check on rate-limit, bot self-test
  4. 04Safe message/media sends (resilient to blocks/errors)
10 /📣 Logging & notifications
  1. 01Unified logEvent to logs/app.log
  2. 02Errors to logs/error.log, critical alerts — to admins
  3. 03Log channel notifications (bans, verification, reports)
  4. 04Send profiles/messages to groups/topics with auto-delete if needed
11 /⏱️ Schedulers & background jobs
  1. 01Deactivate inactive users every 12h
  2. 02Clean old contact requests daily
  3. 03TTL cleanup for profile views (7 days)
  4. 04Healthcheck module (infrastructure checks)
12 /📱 Bot UI & menus
  1. 01Main menu and start menu (keyboards and inline)
  2. 02Sections: my profile, search, edit, chat, bug report
  3. 03Inline Main Menu and quick navigation
  4. 04Telegram chat button
13 /🧩 Technical
  1. 01Node.js (CommonJS) + Telegraf
  2. 02MongoDB with indexes and basic schema validation
  3. 03Redis (ioredis) for sessions and rate limit
  4. 04Local screenshots in uploads/screenshots + file_id
  5. 05Env-based config (BOT_TOKEN, MONGO_URI, etc.)
  6. 06Topics support (message_thread_id) for supergroups