async def p_cb(b, cb): global que qeue = que.get(cb.message.chat.id) type_ = cb.matches[0].group(1) chat_id = cb.message.chat.id m_chat = cb.message.chat the_data = cb.message.reply_markup.inline_keyboard[1][0].callback_data if type_ == 'playlist': queue = que.get(cb.message.chat.id) if not queue: await cb.message.edit('Tidak ada daftar apapun!') temp = [] for t in queue: temp.append(t) now_playing = temp[0][0] by = temp[0][1].mention(style='md') msg = "**Lagu yang sedang dimainkan** di {}".format( cb.message.chat.title) msg += "\n> " + now_playing msg += "\n> Permintaan By " + by msg += "\n───────────────────────" temp.pop(0) if temp: msg += '\n\n' msg += '**Daftar list antrian lagu**' for song in temp: name = song[0] usr = song[1].mention(style='md') msg += f'\n> {name}' msg += f'\n> Permintaan By {usr}\n' msg += "\n───────────────────────" await cb.message.edit(msg)
async def p_cb(b, cb): global que qeue = que.get(cb.message.chat.id) type_ = cb.matches[0].group(1) chat_id = cb.message.chat.id m_chat = cb.message.chat the_data = cb.message.reply_markup.inline_keyboard[1][0].callback_data if type_ == 'playlist': queue = que.get(cb.message.chat.id) if not queue: await cb.message.edit('Tidak ada daftar apapun') temp = [] for t in queue: temp.append(t) now_playing = temp[0][0] by = temp[0][1].mention(style='md') msg = "**• Daftar lagu yang sedang diputar di grup {}:**".format(cb.message.chat.title) msg += "\n♬ "+ now_playing msg += "\n♬ Permintaan "+by msg += "\n───────────────────────" temp.pop(0) if temp: msg += '\n\n' msg += '**• Daftar lagu selanjutnya yang akan diputar:**' for song in temp: name = song[0] usr = song[1].mention(style='md') msg += f'\n♬ {name}' msg += f'\n♬ Permintaan {usr}' msg += f'\n┈─────────────────────┈' await cb.message.edit(msg)
async def p_cb(b, cb): global que qeue = que.get(cb.message.chat.id) type_ = cb.matches[0].group(1) chat_id = cb.message.chat.id m_chat = cb.message.chat the_data = cb.message.reply_markup.inline_keyboard[1][0].callback_data if type_ == 'playlist': queue = que.get(cb.message.chat.id) if not queue: await cb.message.edit('Player is idle') temp = [] for t in queue: temp.append(t) now_playing = temp[0][0] by = temp[0][1].mention(style='md') msg = "**Now Playing** in {}".format(cb.message.chat.title) msg += "\n- " + now_playing msg += "\n- Req by " + by temp.pop(0) if temp: msg += '\n\n' msg += '**Queue**' for song in temp: name = song[0] usr = song[1].mention(style='md') msg += f'\n- {name}' msg += f'\n- Req by {usr}\n' await cb.message.edit(msg)
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Hurungkeun hela sia poiscot na!')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Tidak ada instansi obrolan suara yang berjalan dalam grup ini')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('No VC instances running in this chat')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Tidak Ada Voice Chat Aktif')
async def playlist(client, message): global que queue = que.get(message.chat.id) if not queue: await message.reply_text('Tidak ada daftar apapun!') temp = [] for t in queue: temp.append(t) now_playing = temp[0][0] by = temp[0][1].mention(style='md') msg = "**• Daftar lagu yang sedang diputar di grup {}:**".format(message.chat.title) msg += "\n♬ "+ now_playing msg += "\n♬ Permintaan: "+by msg += "\n─────────────────────" temp.pop(0) if temp: msg += '\n\n' msg += '**• Daftar lagu selanjutnya yang akan diputar:**' for song in temp: name = song[0] usr = song[1].mention(style='md') msg += f'\n♬ {name}' msg += f'\n♬ Permintaan: {usr}' msg += f'\n┈───────────────────┈' await message.reply_text(msg)
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Silahkan hidupkan dulu vcg nya!')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Bu sohbette çalışan VC örneği yok')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Please turn on the VCG first!')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Tidak ada VCG dalam obrolan untuk memutar musik')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('vc ഇല്ല')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Silahkan Nyalakan dulu Voice Chat Grup nya!')
async def ee(client, message): queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: await message.reply(stats) else: await message.reply('Tidak Ada Instansi VCG Yang Berjalan Disini.')
async def currents(_, message: Message): queuess = que.get(message.chat.id) stats = updated_stats(message.chat, queuess) if stats: await message.reply(stats) else: await message.reply("Tidak ada obrolan suara yang berjalan di grup ini" )
async def plylist_callback(_, cb): global que que.get(cb.message.chat.id) type_ = cb.matches[0].group(1) cb.message.chat cb.message.chat.id cb.message.reply_markup.inline_keyboard[0][0].callback_data if type_ == "playlist": queue = que.get(cb.message.chat.id) playing = True if cb.message.chat.id in callsmusic.pytgcalls.active_calls else None stats = updated_stats(cb.message.chat, queue) temp = [] for t in queue: if t is not None: temp.append(t) else: pass now_playing = temp[0][0] by = temp[0][1].mention(style="md") msg = f"**Sedang Diputar** di {cb.message.chat.title}" msg += f"\n- {now_playing}" msg += f"\n- Atas Permintaan {by}" temp.pop(0) if stats: if playing: if temp: msg += "\n\n" msg += "**Dalam Antrian**" for song in temp: name = song[0] usr = song[1].mention(style="md") msg += f"\n- {name}" msg += f"\n- Atas Permintaan{usr}" await cb.message.edit( msg, reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("⬅ Kembali", "back"), InlineKeyboardButton("❌ Tutup", "cls") ]])) else: await cb.message.edit("Tidak ada lagu yang diputar saat ini", reply_markup=InlineKeyboardMarkup([[ InlineKeyboardButton("❌ Tutup", "cls") ]]))
async def player(_, message: Message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=ply_typ("pause")) else: await message.reply(stats, reply_markup=ply_typ("play")) else: await message.reply("Tidak ada Obrolan suara yang berjalan disini")
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Tidak Ada Instansi VCG Yang Berjalan Disini.')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Tidak ada instansi obrolan suara yang berjalan dalam grup ini')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Please turn on the VCG first!')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Bu sohbette çalışan VC örneği yok')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Hurungkeun hela sia poiscot na!')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('No VC instances running in this chat')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Tidak Ada VCG dalam obrolan untuk memutar musik')
async def settings(client, message): playing = None if message.chat.id in callsmusic.pytgcalls.active_calls: playing = True queue = que.get(message.chat.id) stats = updated_stats(message.chat, queue) if stats: if playing: await message.reply(stats, reply_markup=r_ply('pause')) else: await message.reply(stats, reply_markup=r_ply('play')) else: await message.reply('Silahkan Nyalakan dulu Voice Chat Grup nya!')
async def skip(_, message: Message): global que if message.chat.id not in callsmusic.pytgcalls.active_calls: await message.reply_text("❗ There are no Next Song to skip!") else: callsmusic.queues.task_done(message.chat.id) if callsmusic.queues.is_empty(message.chat.id): callsmusic.pytgcalls.leave_group_call(message.chat.id) else: callsmusic.pytgcalls.change_stream( message.chat.id, callsmusic.queues.get(message.chat.id)["file"]) qeue = que.get(message.chat.id) if qeue: skip = qeue.pop(0) if not qeue: return await message.reply_text( f'- Skip Songs **{skip[0]}**\n- Now Playing Songs **{qeue[0][0]}**')
async def skip(_, message: Message): global que if message.chat.id not in callsmusic.pytgcalls.active_calls: await message.reply_text("❗ Tidak Ada Lagu Untuk Diskip!") else: callsmusic.queues.task_done(message.chat.id) if callsmusic.queues.is_empty(message.chat.id): callsmusic.pytgcalls.leave_group_call(message.chat.id) else: callsmusic.pytgcalls.change_stream( message.chat.id, callsmusic.queues.get(message.chat.id)["file"]) qeue = que.get(message.chat.id) if qeue: skip = qeue.pop(0) if not qeue: return await message.reply_text( f'- Skipped **{skip[0]}**\n- Dimainkan **{qeue[0][0]}**')
async def skip(_, message: Message): global que if message.chat.id not in callsmusic.pytgcalls.active_calls: await message.reply_text("❗ Atlamak için hiçbir şey oynamıyor!") else: callsmusic.queues.task_done(message.chat.id) if callsmusic.queues.is_empty(message.chat.id): callsmusic.pytgcalls.leave_group_call(message.chat.id) else: callsmusic.pytgcalls.change_stream( message.chat.id, callsmusic.queues.get(message.chat.id)["file"]) qeue = que.get(message.chat.id) if qeue: skip = qeue.pop(0) if not qeue: return await message.reply_text( f'- Atlanır **{skip[0]}**\n- Şimdi Yürüteniyor **{qeue[0][0]}**')
async def skip(_, message: Message): global que if message.chat.id not in callsmusic.pytgcalls.active_calls: await message.reply_text( "❌ Tidak Ada Lagu Yang Diputar Untuk Dilewati.") else: callsmusic.queues.task_done(message.chat.id) if callsmusic.queues.is_empty(message.chat.id): callsmusic.pytgcalls.leave_group_call(message.chat.id) else: callsmusic.pytgcalls.change_stream( message.chat.id, callsmusic.queues.get(message.chat.id)["file"]) qeue = que.get(message.chat.id) if qeue: skip = qeue.pop(0) if not qeue: return await message.reply_text( f'- Melewati **{skip[0]}**\n- Sedang Memutar **{qeue[0][0]}**')