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
+6
View File
@@ -35,6 +35,10 @@ export interface InlineKeyboardButton {
export interface InlineKeyboardMarkup {
inline_keyboard: InlineKeyboardButton[][];
}
export interface TelegramBotCommand {
command: string;
description: string;
}
export interface TelegramClientOptions {
fetch?: typeof fetch;
baseUrl?: string;
@@ -46,6 +50,7 @@ export interface TelegramClientLike {
sendMessage(chatId: number, text: string, parseMode?: string, replyMarkup?: InlineKeyboardMarkup): Promise<TelegramMessage>;
sendChatAction(chatId: number, action: string): Promise<boolean>;
answerCallbackQuery(callbackQueryId: string, text?: string): Promise<boolean>;
setMyCommands(commands: TelegramBotCommand[]): Promise<boolean>;
}
export declare class TelegramClient implements TelegramClientLike {
private readonly token;
@@ -60,4 +65,5 @@ export declare class TelegramClient implements TelegramClientLike {
sendMessage(chatId: number, text: string, parseMode?: string, replyMarkup?: InlineKeyboardMarkup): Promise<TelegramMessage>;
sendChatAction(chatId: number, action: string): Promise<boolean>;
answerCallbackQuery(callbackQueryId: string, text?: string): Promise<boolean>;
setMyCommands(commands: TelegramBotCommand[]): Promise<boolean>;
}