MCPcopy Create free account
hub / github.com/AsmSafone/VideoPlayerBot / endstream

Function endstream

plugins/video.py:292–307  ·  view source on GitHub ↗
(client, m: Message)

Source from the content-addressed store, hash-verified

290@Client.on_message(filters.command(["endstream", f"endstream@{USERNAME}"]) & filters.group & ~filters.edited)
291@authorized_users_only
292async def endstream(client, m: Message):
293 msg = await m.reply_text("🔄 `Processing ...`")
294 chat_id = m.chat.id
295
296 if chat_id in AUDIO_CALL:
297 await AUDIO_CALL[chat_id].stop()
298 AUDIO_CALL.pop(chat_id)
299 await msg.edit("⏹️ **Stopped Audio Streaming !**")
300
301 elif chat_id in VIDEO_CALL:
302 await VIDEO_CALL[chat_id].stop()
303 VIDEO_CALL.pop(chat_id)
304 await msg.edit("⏹️ **Stopped Video Streaming !**")
305
306 else:
307 await msg.edit("🤖 **Please Start An Stream First !**")
308
309
310# pytgcalls handlers

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected