Sign inSign up

dd0gring/tg-media-bot

By dd0gring

•Updated about 1 month ago

Image
0

2.8K

dd0gring/tg-media-bot repository overview

⁠🧾 dd0gring/tg-media-bot

⁠🗂️ Description / 描述

tg-media-bot is a lightweight Telegram bot for storing user-uploaded files and retrieving them securely.

tg-media-bot 是一个轻量级的 Telegram 文件存储机器人,用户发送文件后,机器人会返回一个加密字符串,用户日后可通过该加密字符串找回对应的文件。


⁠✨ Features / 功能特点

  • 🔐 Secure file storage with encrypted access key
    使用加密字符串安全存储和访问文件

  • 📎 Supports various Telegram media types (documents, videos, images, etc.)
    支持多种 Telegram 媒体类型(文档、视频、图片等)

  • 🔁 Automatically restarts unless manually stopped
    自动重启(除非手动停止)

  • 🕒 Timezone and log level configurable
    可配置时区与日志等级

  • 📁 Log directory mapping for easy tracking
    挂载日志目录便于调试与追踪


⁠⚙️ Environment Variables / 环境变量

VariableDescription (EN)描述(中文)
TELEGRAM_TOKENYour Telegram Bot Token你的 Telegram Bot Token
SECRET_KEYA strong 32-character secret key for encryption用于加密的 32 位强密钥
LOG_LEVELLogging level, e.g., INFO, DEBUG日志等级,如 INFO、DEBUG
TZTimezone (e.g., Asia/Shanghai)时区设置(例如:Asia/Shanghai)

⁠📁 Volume Mapping / 挂载目录说明

Host Path / 主机路径Container Path / 容器路径Purpose / 用途
./logs/app/logs保存日志文件,用于追踪与调试

⁠📌 How It Works / 工作原理

📤 A user sends a file to the bot 用户向机器人发送文件

🔑 The bot responds with a unique encrypted key 机器人返回一个唯一加密字符串

📥 The user can send this key back to retrieve the original file 用户之后可以通过发送此加密字符串取回原始文件

⁠📦 Example Docker Run / 示例运行命令

docker run -d \
  --name tg-media-bot \
  --restart unless-stopped \
  -v ./logs:/app/logs \
  -e TZ=Asia/Shanghai \
  -e LOG_LEVEL=INFO \
  -e TELEGRAM_TOKEN=your_telegram_bot_token_here \
  -e SECRET_KEY=your_strong_random_32character_secret_key_here \
  dd0gring/tg-media-bot:latest

⁠🛠️ Author / 作者

Maintained by dd0gring

欢迎反馈问题或提交建议!

Tag summary

Content type

Image

Digest

sha256:32498ccd8…

Size

50.3 MB

Last updated

about 1 month ago

docker pull dd0gring/tg-media-bot