yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.34k stars 1.52k forks source link

sendMediaGroup - InputMediaDocument #1177

Open mat-twg opened 7 months ago

mat-twg commented 7 months ago

InputMediaDocument in sendMediaGroup is unavailable, please fix that.

https://core.telegram.org/bots/api#inputmediadocument

danielperez9430 commented 7 months ago

You are talking about the typescript types maybe? Because send media documents is possible with sendMediaGroup in this library

mat-twg commented 7 months ago

ts - yes... has type errors, btw this working, but has not full ts support...

bot.sendMediaGroup(
    subscription.chatId, files.map((file) => ({
        type: "document" as any,
        media: file,
    })),
    {
        disable_notification: true,
        reply_to_message_id: message.message_id,
    },
);