Relative Content

Tag Archive for pythontelegrampy-telegram-bot-api

Refer to a variable by name, which is other variable content

So I am writing telegram bot, which is really my first serious project on Python.
When user sends video or audio, my bot should modify it in some way, which is same for both. So I have my algorithm, but it needs to know file size of whatever user sent to it.
Here’s the problem. Telegram gives me file size in message.audio.file_size or message.video.file_size accordingly, not in some message.file.file_size.
(I also can get content type by message.content_type)