Add Bun bundle docs and Telegram grammY support

This commit is contained in:
Peter Steinberger
2025-12-07 22:46:02 +01:00
parent 7b77e9f9ae
commit 4d3d9cca2a
16 changed files with 883 additions and 9 deletions

7
src/telegram/proxy.ts Normal file
View File

@@ -0,0 +1,7 @@
import { ProxyAgent } from "undici";
export function makeProxyFetch(proxyUrl: string): typeof fetch {
const agent = new ProxyAgent(proxyUrl);
return (input: RequestInfo | URL, init?: RequestInit) =>
fetch(input, { ...(init as any), dispatcher: agent } as RequestInit);
}