MCPcopy Create free account
hub / github.com/VJBots/VJ-Forward-Bot / custom_caption

Function custom_caption

plugins/regix.py:314–327  ·  view source on GitHub ↗
(msg, caption)

Source from the content-addressed store, hash-verified

312# Ask Doubt on telegram @KingVJ01
313
314def 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

Callers 2

pub_Function · 0.85
restart_pending_forwadsFunction · 0.85

Calls 1

get_sizeFunction · 0.85

Tested by

no test coverage detected