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

Function stop_forward

plugins/regix.py:463–474  ·  view source on GitHub ↗
(client, message)

Source from the content-addressed store, hash-verified

461
462@Client.on_message(filters.private & filters.command(['stop']))
463async def stop_forward(client, message):
464 user_id = message.from_user.id
465 sts = await message.reply('<code>Stoping...</code>')
466 await asyncio.sleep(0.5)
467 if not await db.is_forwad_exit(message.from_user.id):
468 return await sts.edit('**No Ongoing Forwards To Cancel**')
469 temp.lock[user_id] = False
470 temp.CANCEL[user_id] = True
471 mst = await db.get_forward_details(user_id)
472 msg = await client.get_messages(user_id, mst['msg_id'])
473 link = f"tg://openmessage?user_id={6648261085}&message_id={mst['msg_id']}"
474 await sts.edit(f"<b>Successfully Canceled </b>", disable_web_page_preview=True)
475
476# Don't Remove Credit Tg - @VJ_Botz
477# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ

Callers

nothing calls this directly

Calls 2

is_forwad_exitMethod · 0.80
get_forward_detailsMethod · 0.80

Tested by

no test coverage detected