async def skip(client, message: Message): if message.chat.id not in callsmusic.active_chats: await message.reply_text("❗️ Nothing is playing") else: queues.task_done(message.chat.id) chat_id = message.chat.id try: await callsmusic.cover_message[chat_id].delete() except: print('deleted') if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) m = await client.send_message(message.chat.id, "Done") await asyncio.sleep(3) await m.delete() else: song = queues.get(message.chat.id) input_filename = None m = await client.send_message(chat_id, "🔄 Processing...") if "file" in song.keys(): input_filename = song["file"] await play_song(client, m, song, song["requested_by"], file=input_filename, force=True) await m.delete() sk = await message.reply_text("Skipped.") await asyncio.sleep(3) await sk.delete()
def play_next(chat_id: int): chat_id = get_channel(chat_id) if queues.is_empty(chat_id): pytgcalls.leave_group_call(chat_id) else: pytgcalls.change_stream( chat_id, queues.get(chat_id)['file_path'], )
async def skip(_, message: Message): if message.chat.id not in callsmusic.active_chats: await message.reply_text("Nothing is playing!") else: queues.task_done(message.chat.id) if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) else: await callsmusic.set_stream(message.chat.id, queues.get(message.chat.id)["file"]) await message.reply_text("Skipped!")
async def skip(_, query: CallbackQuery): if message.chat.id not in callsmusic.active_chats: await query.message.reply_text("❗️ Nothing is playing") else: queues.task_done(message.chat.id) if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) else: await callsmusic.set_stream(message.chat.id, queues.get(message.chat.id)["file"]) await query.message.reply_text("Skipped.")
async def skip(_, message: Message): if message.chat.id not in callsmusic.active_chats: await message.reply_text("لا يتم تشغيل شيء ☹️") else: queues.task_done(message.chat.id) if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) else: await callsmusic.set_stream(message.chat.id, queues.get(message.chat.id)["file"]) await message.reply_text("تم التخطي! ↪")
async def cbskip(_, query: CallbackQuery): if query.message.chat.id not in callsmusic.active_chats: await query.edit_message_text("❗️ Nothing is playing", reply_markup=BACK_BUTTON) else: queues.task_done(query.message.chat.id) if queues.is_empty(query.message.chat.id): await callsmusic.stop(query.message.chat.id) else: await callsmusic.set_stream( query.message.chat.id, queues.get(query.message.chat.id)["file"] ) await query.edit_message_text("🗑 Skipped", reply_markup=BACK_BUTTON)
async def skip(_, message: Message): if message.chat.id not in callsmusic.active_chats: await message.reply_text("Maaf Tidak Bisa Diskip Paksa!") else: queues.task_done(message.chat.id) if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) else: await callsmusic.set_stream( message.chat.id, queues.get(message.chat.id)["file"] ) await message.reply_text("Lagu Kamu Sudah Diskip, Next Lanjut Lagu Berikutnya!")
async def skip(_, message: Message): if message.chat.id not in callsmusic.active_chats: await message.reply_text( "❗️ Tidak Bisa Dipaksakan Lanjut/Skip Lagu Berikutnya!") else: queues.task_done(message.chat.id) if queues.is_empty(message.chat.id): await callsmusic.stop(message.chat.id) else: await callsmusic.set_stream(message.chat.id, queues.get(message.chat.id)["file"]) await message.reply_text( "Lagu Kamu Sudah Dinext, Sekarang Lagu Berikutnya!.")