(bot, msg)
| 431 | |
| 432 | @Client.on_callback_query(filters.regex(r'^fwrdstatus')) |
| 433 | async 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 |
nothing calls this directly
no test coverage detected