Simplify install with one-click scripts; honor HTTP(S)_PROXY for Telegram.

Add install.ps1/install.sh, shrink README to script-first flow, register bot commands, and route API calls through undici EnvHttpProxyAgent when a proxy is set (v0.2.2).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 17:46:01 +08:00
co-authored by Cursor
parent 8ef1622822
commit a83af2f33c
15 changed files with 1255 additions and 204 deletions
+12
View File
@@ -51,9 +51,21 @@ export class TelegramBridge {
this.ctx.logger.error(this.redact(err));
});
});
void this.client.setMyCommands([
{ command: 'start', description: '欢迎与用法' },
{ command: 'sessions', description: '列出并附着本机 live 会话' },
{ command: 'status', description: '查看当前绑定' },
{ command: 'unbind', description: '断开手机绑定(不关闭本机会话)' },
{ command: 'help', description: '显示帮助' },
]).then(() => {
this.ctx.logger.info('dsh-telegram-channel: bot commands registered');
}).catch((err) => {
this.ctx.logger.warn(`dsh-telegram-channel: setMyCommands failed: ${this.redact(err)}`);
});
if (!this.polling) {
this.polling = true;
this.pollAbort = new AbortController();
this.ctx.logger.info('dsh-telegram-channel: long-polling started');
this.pollPromise = this.pollLoop();
}
}