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

Function status_msg

plugins/regix.py:433–447  ·  view source on GitHub ↗
(bot, msg)

Source from the content-addressed store, hash-verified

431
432@Client.on_callback_query(filters.regex(r'^fwrdstatus'))
433async def status_msg(bot, msg):
434 _, status, est_time, percentage, frwd_id = msg.data.split("#")
435 sts = STS(frwd_id)
436 if not sts.verify():
437 fetched, forwarded, remaining = 0
438 else:
439 fetched, limit, forwarded = sts.get('fetched'), sts.get('limit'), sts.get('total_files')
440 remaining = limit - fetched
441 est_time = TimeFormatter(milliseconds=est_time)
442 start_time = sts.get('start')
443 uptime = await get_bot_uptime(start_time)
444 total = sts.get('limit') - sts.get('fetched')
445 time_to_comple = await complete_time(total)
446 est_time = est_time if (est_time != '' or status not in ['completed', 'cancelled']) else '0 s'
447 return await msg.answer(PROGRESS.format(percentage, fetched, forwarded, remaining, status, time_to_comple, uptime), show_alert=True)
448
449# Don't Remove Credit Tg - @VJ_Botz
450# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ

Callers

nothing calls this directly

Calls 6

verifyMethod · 0.95
getMethod · 0.95
STSClass · 0.85
TimeFormatterFunction · 0.85
complete_timeFunction · 0.85
get_bot_uptimeFunction · 0.70

Tested by

no test coverage detected