This commit is contained in:
levina 2021-11-26 14:09:11 +07:00 committed by GitHub
parent f8b5fdc196
commit 6fe2600045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,16 +104,16 @@ async def left_handler(_, chat_id: int):
@call_py.on_stream_end()
async def stream_end_handler(_, c: Client, u: Update):
async def stream_end_handler(_, u: Update):
if isinstance(u, StreamAudioEnded) or isinstance(u, StreamVideoEnded):
chat_id = u.chat_id
print(chat_id)
op = await skip_current_song(chat_id)
if op==1:
await c.send_message(chat_id, "✅ __Queues__ **is empty**\n\n» **userbot leaving video chat**")
await bot.send_message(chat_id, "✅ __Queues__ **is empty**\n\n» **userbot leaving video chat**")
elif op==2:
await c.send_message(chat_id, "❌ **an error occurred**\n\n» **Clearing** __Queues__ **and leaving video chat.**")
await bot.send_message(chat_id, "❌ **an error occurred**\n\n» **Clearing** __Queues__ **and leaving video chat.**")
else:
await c.send_photo(chat_id, photo=f"{IMG_4}", caption=f"💡 **Streaming next track**\n\n🏷 **Name:** [{op[0]}]({op[1]}) | `{op[2]}`\n💭 **Chat:** `{chat_id}`", reply_markup=keyboard)
await bot.send_message(chat_id, f"💡 **Streaming next track**\n\n🏷 **Name:** [{op[0]}]({op[1]}) | `{op[2]}`\n💭 **Chat:** `{chat_id}`", reply_markup=keyboard)
else:
pass