| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-06-22 | 2.3 kB | |
| v1.1.1 source code.tar.gz | 2026-06-22 | 1.3 MB | |
| v1.1.1 source code.zip | 2026-06-22 | 1.3 MB | |
| Totals: 3 Items | 2.6 MB | 0 | |
Added
request.fetchandrequest.fetchOptionsoptions (on theTelegramBotconstructor /HttpClient), for per-instance transport customization. Pass a customfetchimplementation (e.g. undici'sfetchbound to aProxyAgent), or extra fetch init such as an undicidispatcher, scoped to a single bot instance - nosetGlobalDispatcher, so other clients in the process are unaffected. This restores the per-instance proxy capability that the legacyrequest.agentprovided before the move to the built-infetch. (#1319)
```ts import TelegramBot from "node-telegram-bot-api"; import { ProxyAgent } from "undici";
const bot = new TelegramBot(token, { polling: true, request: { fetchOptions: { dispatcher: new ProxyAgent("http://127.0.0.1:8080") } }, }); ```
Fixed
-
editMessageMedianow accepts a Buffer / stream / local file path for the newmedia(and itsthumbnail/cover), uploading it via anattach://part - previously only a file_id / URL or the legacyattach://<local-path>form worked. Resolved through the same_buildMediaItemspipeline assendMediaGroup; string callers and the oldattach://<local-path>form are unaffected. (#1189) -
Breaking:
createNewStickerSetandaddStickerToSetwere still sending the long-removedpng_sticker/emojisfields, which Telegram rejects with400 Bad Request: invalid sticker emojis. They now use the current Bot API shape - a single options object carryingstickers: InputSticker[](or a singlesticker: InputSticker), where each sticker's file (Buffer / stream / local path) is uploaded via anattach://part, while a file_id / URL string passes through unchanged. (#1236)
```ts // Before (broken): bot.createNewStickerSet(userId, name, title, pngSticker, "😀");
// After: bot.createNewStickerSet({ user_id: userId, name, title, stickers: [{ sticker: "./a.png", format: "static", emoji_list: ["😀"] }], }); bot.addStickerToSet({ user_id: userId, name, sticker: { sticker: "./b.webp", format: "static", emoji_list: ["🎈"] }, }); ```