D
dsh-im-telegram
v1.0.5 · 3 天前发布
Telegram 渠道适配器(dsh-im 插件家族):bot API polling 长连接,免公网;支持内联按钮审批卡片。
README
dsh-im-telegram(Telegram 适配器)
Telegram 渠道适配器:Bot API polling 长连接(免公网、NAT 友好),内联按钮审批卡片,文件交付(/log)。
inject: ['im'](需 dsh-im 核心)token: 'env:TELEGRAM_BOT_TOKEN'(找 @BotFather 创建 bot)npm run test:telegram(8 个,本地假 Bot API 服务器,无需真实 token)特性
getUpdates(long-poll,30s),指数退避重连(FR-1.5);401/409 致命错误停止并提示(token 冲突检测 C4)inline_keyboard 按钮(审批卡片);sendFile 以 document 交付/status 可见连接状态与缺口(FR-9.3)配置
yaml
id: im-telegram
name: 'dsh-im-telegram'
config:
token: 'env:TELEGRAM_BOT_TOKEN'
mode: polling # polling | webhook(webhook 需要公网 HTTPS + webhookUrl)
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-im-telegram
- Repo
- git+https://github.com/shaobeichen/dsh-im-bridge.git
- Engines
{"node":">=22"}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}