(msg, caption)
| 312 | # Ask Doubt on telegram @KingVJ01 |
| 313 | |
| 314 | def custom_caption(msg, caption): |
| 315 | if msg.media: |
| 316 | if (msg.video or msg.document or msg.audio or msg.photo): |
| 317 | media = getattr(msg, msg.media.value, None) |
| 318 | if media: |
| 319 | file_name = getattr(media, 'file_name', '') |
| 320 | file_size = getattr(media, 'file_size', '') |
| 321 | fcaption = getattr(msg, 'caption', '') |
| 322 | if fcaption: |
| 323 | fcaption = fcaption.html |
| 324 | if caption: |
| 325 | return caption.format(filename=file_name, size=get_size(file_size), caption=fcaption) |
| 326 | return fcaption |
| 327 | return None |
| 328 | |
| 329 | # Don't Remove Credit Tg - @VJ_Botz |
| 330 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ |
no test coverage detected