Skip to content

feat(leech): Leech V1 - Telegram Message Leech with SQLite & Structured Logging#90

Open
tp-ai666 wants to merge 1 commit into
TeleBoxOrg:mainfrom
tp-ai666:feature/TelegramUserbot/Leeching/V1Telebox
Open

feat(leech): Leech V1 - Telegram Message Leech with SQLite & Structured Logging#90
tp-ai666 wants to merge 1 commit into
TeleBoxOrg:mainfrom
tp-ai666:feature/TelegramUserbot/Leeching/V1Telebox

Conversation

@tp-ai666

Copy link
Copy Markdown

Summary / 概述

This PR adds a Leech V1 plugin to TeleBox — a Telegram message leeching system with local SQLite storage and structured logging.

本 PR 为 TeleBox 添加 Leech V1 插件 — 一个带本地 SQLite 存储和结构化日志的 Telegram 消息抓取系统。

Features / 功能

  1. Login Session Check / 登录 Session 检查 — .leech login / .leech session
  2. Date-Range Message Leech / 按日期范围抓取消息 — .leech chat --from YYYY-MM-DD --to YYYY-MM-DD
  3. Local SQLite DB / 本地 SQLite 存储 — leech_jobs, leech_messages, leech_actions
  4. Structured Logging / 结构化日志 — JSON logs for every action (console + SQLite)
  5. Bilingual Comments / 中英文注释 — Core logic uses English + Chinese comments
  6. Bilingual Docs / 中英文文档 — README, Architecture, Features docs all bilingual

New Files / 新增文件

File / 文件 Purpose / 用途
src/plugin/leech.ts Command entry point / 命令入口
src/utils/leech/*.ts Core leech modules (8 files) / 核心模块
scripts/leech-smoke.ts Local smoke test / 本地冒烟测试
LEECH_README.md Usage documentation / 使用文档
LEECH_ARCHITECTURE.md Architecture design / 架构设计
LEECH_FEATURES.md Feature explanation / 功能解释
ANALYSIS.md Reverse engineering notes / 逆向分析笔记
STRUCTURE.md Project structure guide / 项目结构说明

Verification / 验证

  • TypeScript strict:
    px tsc --noEmit — PASSED
  • Local smoke test:
    pm run leech:smoke — PASSED (service layer + plugin command layer)

Commands / 命令

.leech login — Check session
.leech chat here --from 2026-01-01 --to 2026-01-31 — Leech messages
.leech jobs — View tasks
.leech stats — View statistics
.leech db — Show DB path

… & structured logging

- Login session check via .leech login/session
- Date-range message leech from chat/group/channel (.leech chat)
- Local SQLite storage: leech_jobs, leech_messages, leech_actions
- Structured JSON logging for every action (console + DB)
- Bilingual code comments (English + Chinese)
- Bilingual documentation (README, Architecture, Features)
- Local smoke test (npm run leech:smoke) with fake Telegram client
- TypeScript strict mode verified (npx tsc --noEmit)
@TiaraBasori

Copy link
Copy Markdown
Member

请 PR 到插件仓库:
github.com/TeleBoxOrg/TeleBox_Plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants