tucnak / telebot

Telebot is a Telegram bot framework in Go.
MIT License
3.93k stars 458 forks source link

proposal: add a way to get a specific entry from PhotoSize fields #386

Open gothchibjo opened 3 years ago

gothchibjo commented 3 years ago

It's important for me to get a thumbnail not larger than width or height, so I would be glad to see something like Message.Photo.[]Sizes. Can I get it from the telebot?

I found in the docs:

type Message struct {
...
// For a photo, all available sizes (thumbnails).
//              ^^^^^^^^^^^^^^^^^^^
Photo *Photo `json:"photo"`

But the Photo struct contains no other thumbnail sizes except the largest one.

demget commented 3 years ago

You're right, currently, it's impossible to get any except the largest one. Maybe we should consider allowing it as well.