yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

[FEATURE REQUEST] Custom `thumb` support when sending files. #1035

Closed DaviSMoura closed 1 year ago

DaviSMoura commented 1 year ago

Introduction

This package don't support thumb param when sending any file (its supported for TG Bot API). Yes, i know Telegram API generate itself thumb for all videos but it can fail sometimes and Telegram API accepts custom thumb so why shouldn't a package that proposes to run the official telegram api support it too? haha. That's why im requesting this feature.

Example

await bot.sendVideo("1251429262", "./video.mp4", {
  thumb: './video_custom_thumb.jpg' // <--- this is not supported by this package but its supported by telegram official api
})
// ----/\ this example is when sending video but can works with almost all type of files, including sendMediaGroup
danielperez9430 commented 1 year ago

Fixed on v0.61.0