前置条件
- Go 1.26+
- 一个 Telegram 机器人令牌(通过 @BotFather 创建)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
从源码构建和安装 BotMux
git clone https://github.com/skrashevich/botmux.git
cd botmux
go build -o botmux .
go install 安装go install github.com/skrashevich/botmux@latest
# With token flag
./botmux -token "123456:ABC-DEF..."
# With environment variable
export TELEGRAM_BOT_TOKEN="123456:ABC-DEF..."
./botmux
# Custom address
./botmux -token "TOKEN" -addr :9090
| 参数 | 默认值 | 说明 |
|---|---|---|
-token | "" | Telegram 机器人令牌(或 TELEGRAM_BOT_TOKEN 环境变量) |
-addr | :8080 | HTTP 服务器监听地址 |
-db | botdata.db | SQLite 数据库文件路径 |
-webhook | "" | 设置用于接收更新的 webhook URL |
-tg-api | "" | 自定义 Telegram API 基础 URL(或 TELEGRAM_API_URL 环境变量) |
-demo | false | 启用演示模式(或 DEMO_MODE=true 环境变量) |
此页面对您有帮助吗?