async def deezer(client: Client, message_: Message): requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = await message_.reply_text(f"Searching ππππ for `{queryy}` on deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Found Literally Nothing, You Should Work On Your English!" ) is_playing = False return file_path= await convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover_square(requested_by, title, artist, duration, thumbnail) if message_.chat.id in tgcalls.pytgcalls.active_calls: await res.edit("adding in queue") position = sira.add(message_.chat.id, file_path) await res.edit_text(f"#οΈβ£ Queued at position {position}.") else: await res.edit_text("βΆοΈ Playing...") tgcalls.pytgcalls.join_group_call(message_.chat.id, file_path, 48000 , tgcalls.pytgcalls.get_cache_peer()) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, photo="final.png", caption=f"Playing [{title}]({url}) Via Deezer." ) os.remove("final.png")
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("**bentar ya sayang** π₯΅") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "MusikVCG" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan saya sebagai admin grup Anda terlebih dahulu</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "Halo Saya Assistant Bot , Saya akan memainkan lagu yang Anda minta π₯΅" ) await lel.edit( "<b>Helper userbot bergabung dengan obrolan Anda</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nAssistant Bot tidak dapat bergabung dengan grup Anda karena banyaknya permintaan bergabung untuk userbot! Pastikan pengguna tidak dibanned dalam grup." "\n\nAtau tambahkan secara manual Assistant Bot ke Grup Anda dan coba lagi</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> Assistant Bot tidak ada dalam grup ini, Minta admin untuk tambahkan Assistant Bot secara manual</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Mencari.... `{queryy}` dari deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit("Tidak ditemukan lagu apa pun!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('Playlist', callback_data='playlist'), InlineKeyboardButton("Panduan", url="https://telegra.ph/Musik-Vcg-Userbot-05-05") ], [InlineKeyboardButton("Owner Musik VCG", url="https://t.me/ccwoyx") ], [InlineKeyboardButton(text="β Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text( f"π **Lagu yang Anda minta dalam antrian di posisi** {position}!") else: await res.edit_text("Playing.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"π **Sedang memutar lagu** [{title}]({url}) via Deezer") os.remove("final.png")
InlineKeyboardButton, InlineQueryResultArticle, InlineQueryResultPhoto, InputTextMessageContent, ) from Python_ARQ import ARQ from search_engine_parser import GoogleSearch from RaVaN import BOT_USERNAME, OWNER_ID from RaVaN.function.pluginhelpers import convert_seconds_to_minutes as time_convert from RaVaN.function.pluginhelpers import fetch from RaVaN.services.pyrogram import pbot SUDOERS = OWNER_ID ARQ_API = "http://35.240.133.234:8000" arq = ARQ(ARQ_API) app = pbot import socket async def _netcat(host, port, content): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) s.sendall(content.encode()) s.shutdown(socket.SHUT_WR) while True: data = s.recv(4096).decode("utf-8").strip("\n\x00") if not data: break return data
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Processing**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "musicvcassistant10" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid,wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Add me as admin of your group first</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message(message_.chat.id,"I joined this group for playing music in VC") await lel.edit( "<b>musicvcassistant10 joined your chat</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nUser {user.first_name} couldn't join your group due to heavy requests for userbot! Make sure @musicvcassistant10 is not banned in group." "\n\nOr manually add @musicvcassistant10 to your Group and try again</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> {user.first_name} Userbot not in this chat, Ask admin to send /play command for first time or add {user.first_name} manually</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Searching πππ for `{queryy}` on deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Found Literally Nothing, You Should Work On Your English!" ) is_playing = False return keyboard = InlineKeyboardMarkup( [ [ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [ InlineKeyboardButton( text="Listen On Deezer π¬", url=f"{url}") ], [ InlineKeyboardButton( text="β Close", callback_data='cls') ] ] ) file_path= await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"#οΈβ£ Queued at position {position}") else: await res.edit_text("βΆοΈ Playing.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"Playing [{title}]({url}) Via Deezer" ) os.remove("final.png")
if is_config: from config import * else: from sample_config import * if HEROKU: if is_config: from config import SESSION_STRING elif not is_config: from sample_config import SESSION_STRING app = Client(SESSION_STRING if HEROKU else "tgvc", api_id=API_ID, api_hash=API_HASH) session = ClientSession() arq = ARQ(ARQ_API, ARQ_API_KEY, session) themes = ["darkred", "lightred", "green", "purple", "skyblue", "dark", "black"] def get_theme(chat_id) -> str: theme = "purple" if chat_id not in db: db[chat_id] = {} if "theme" not in db[chat_id]: db[chat_id]["theme"] = theme theme = db[chat_id]["theme"] return theme def change_theme(name: str, chat_id): if chat_id not in db:
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Sedang Memproses**") administrators = await get_administrators(message_.chat) chid = message_.chat.id usar = await USER.get_me() wew = usar.id for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan saya sebagai admin grup terlebih dahulu</b>", ) return try: await USER.join_chat(invitelink) await lel.edit("<b>helper userbot joined your chat</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) #await lel.edit( # f"<b>User {user.first_name} couldn't join your group! Make sure user is not banned in group." # "\n\nOr manually add @DaisyXmusic to your Group and try again</b>", #) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( "<i> @helper Userbot not in this chat, Ask admin to send /play command for first time or add assistant manually</i>" ) return requested_by = message_.from_user.first_name try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: await lel.reply( "<i>Looks like helper Userbot not in this chat, Ask admin to send /play command for first time or add assistant manually</i>" ) pass text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Searching πππ for `{queryy}` on deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Found Literally Nothing, You Should Work On Your English!") is_playing = False return keyboard = InlineKeyboardMarkup( [[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [ InlineKeyboardButton("Ch Support", url="https://t.me/hanyabotferi"), InlineKeyboardButton("Owner Musik", url="https:/t.me/xflicks") ], [InlineKeyboardButton(text="β Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"Playing [{title}]({url}) Via Deezer") else: await res.edit_text("βΆοΈ Memutar Lagu.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"#οΈβ£ Mengantri di posisi {position}.).") os.remove("final.png")
if not HEROKU: print("[INFO]: LOADING USERBOT CLIENT") app2 = Client("userbot", phone_number=PHONE_NUMBER, api_id=API_ID, api_hash=API_HASH) else: print("[INFO]: LOADING USERBOT CLIENT") app2 = Client(SESSION_STRING, api_id=API_ID, api_hash=API_HASH) # Bot client print("[INFO]: LOADING BOT CLIENT") app = Client("wbb", bot_token=BOT_TOKEN, api_id=API_ID, api_hash=API_HASH) # ARQ client print("[INFO]: LOADING ARQ") arq = ARQ(ARQ_API_URL, ARQ_API_KEY) # Telegraph client print("[INFO]: LOADING TELEGRAPH") telegraph = Telegraph() telegraph.create_account(short_name="wbb") BOT_ID = 0 BOT_NAME = "" BOT_USERNAME = "" BOT_MENTION = "" BOT_DC_ID = 0 USERBOT_ID = 0 USERBOT_NAME = "" USERBOT_USERNAME = "" USERBOT_DC_ID = 0 USERBOT_MENTION = ""
from DaisyXMusic.config import DURATION_LIMIT from DaisyXMusic.config import UPDATES_CHANNEL as updateschannel from DaisyXMusic.config import que from DaisyXMusic.function.admins import admins as a from DaisyXMusic.helpers.admins import get_administrators from DaisyXMusic.helpers.channelmusic import get_chat_id from DaisyXMusic.helpers.decorators import authorized_users_only from DaisyXMusic.helpers.filters import command, other_filters from DaisyXMusic.helpers.gets import get_file_name from DaisyXMusic.services.callsmusic import callsmusic, queues from DaisyXMusic.services.callsmusic.callsmusic import client as USER from DaisyXMusic.services.converter.converter import convert from DaisyXMusic.services.downloaders import youtube chat_id = None arq = ARQ("https://thearq.tech", ARQ_API_KEY) def cb_admin_check(func: Callable) -> Callable: async def decorator(client, cb): admemes = a.get(cb.message.chat.id) if cb.from_user.id in admemes: return await func(client, cb) else: await cb.answer("Δ°zin yok", show_alert=True) return return decorator def transcode(filename):
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Sedang Proses**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "DaisyMusic" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Jadikan Aku Admin Terlebih Dahulu</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "Aku Official Assistance Dari Tokai Music Bot") await lel.edit( "<b>Asisten Bot Berhasil Join Ke Grup</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nUser {user.first_name} Tidak Dapat Memasuki Grup Karena Masalah Flood! Pastikan User Tidak Dibanned Digrup." "\n\nAtau Tambahkan @TokaiMusicAssistance Secara Manual Dan Coba Lagi</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> {user.first_name} Userbot Tidak Ada Di Grup, Minta Admin Untuk /play Command Untuk Pertama Kalinya Atau Menambahkan {user.first_name} Secara Manual</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Sedang Mencari `{queryy}` Via Deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit("Tidak Menemukan Apapun, Ketik Dengan Benar!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [InlineKeyboardButton(text="Channel", url='https://t.me/TokaiMusik')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"Tokai Music #οΈβ£ Queued Di Posisi {position}") else: await res.edit_text("Tokai Music βΆοΈ Memutar.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo(chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"Memutar [{title}]({url}) Via Deezer") os.remove("final.png")
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **IΕleme**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "TurkishVoicebot" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid,wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Γnce beni grubunun yΓΆneticisi olarak ekle</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message(message_.chat.id,"Bu gruba VC'de mΓΌzik Γ§almak iΓ§in katΔ±ldΔ±m.") await lel.edit( "<b>yardΔ±mcΔ± userbot sohbetinize katΔ±ldΔ±</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ TaΕan Bekleme HatasΔ± π΄ \nUser {user.first_name} userbot iΓ§in yoΔun istekler nedeniyle grubunuza katΔ±lamadΔ±! KullanΔ±cΔ±nΔ±n grupta yasaklΔ± olmadΔ±ΔΔ±ndan emin olun." "\n\nOr Elle ekl @TurkishVoicebot grubunuza ve yeniden deneyin</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> {user.first_name} Userbot bu sohbette yok, YΓΆneticiden gΓΆndermesini iste /play komut ilk kez veya elle ekle {user.first_name} </i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"AraΕtΔ±rΔ±yor πππ `{queryy}` deezer ΓΌzerinde") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Kelimenin Tam AnlamΔ±yla HiΓ§bir Εey BulunamadΔ±, TΓΌrkΓ§e ΓΌzerinde Γ§alΔ±ΕmalΔ±sΔ±nΔ±z!" ) is_playing = False return keyboard = InlineKeyboardMarkup( [ [ InlineKeyboardButton('π Γalma listesi', callback_data='playlist'), InlineKeyboardButton('MenΓΌ β― ', callback_data='menu') ], [ InlineKeyboardButton( text="Deezer'da Dinle π¬", url=f"{url}") ], [ InlineKeyboardButton( text="β kapatmak", callback_data='cls') ] ] ) file_path= await converter.convert(wget.download(url)) await res.edit("Küçük Resim OluΕturma") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("sΔ±raya ekleme") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text("TurkishVoicebot= #οΈβ£ Konumda sΔ±raya alΔ±ndΔ± {position}") else: await res.edit_text("TurkishVoicebotπ§=βΆοΈ ΓalΔ±yor.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"ΓalΔ±yor [{title}]({url}) Deezer" ) os.remove("final.png")
session_name, api_id=API_ID, api_hash=API_HASH, bot_token=TOKEN, ) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Data Center β’ Mumbai β’ MongoDB Database") mongodb = MongoClient(MONGO_DB_URL, 27017)[MONGO_DB] motor = motor_asyncio.AsyncIOMotorClient(MONGO_DB_URL) db = motor[MONGO_DB] engine = AIOEngine(motor, MONGO_DB) print("[INFO]: INITIALZING AIOHTTP SESSION") aiohttpsession = ClientSession() # ARQ Client print("[INFO]: INITIALIZING ARQ CLIENT") arq = ARQ("https://thearq.tech", "YIECCC-NAJARO-OLLREW-SJSRIP-ARQ", aiohttpsession) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Data Center β’ Mumbai β’ PostgreSQL Database" ) ubot = TelegramClient(StringSession(STRING_SESSION), APP_ID, APP_HASH) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Cutiepii Userbot (t.me/Awesome_Cutiepii)" ) timeout = httpx.Timeout(40) http = httpx.AsyncClient(http2=True, timeout=timeout) async def get_entity(client, entity): entity_client = client if not isinstance(entity, Chat): try:
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Processing Song**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "MusicMan" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit("<b>Add me as your group admin first</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "I joined this group to play music on VCG") await lel.edit("<b>Userbot helper joins your chat</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nAssistant Bot cannot join your group due to the many requests to join userbot! Make sure the user is not banned in the group." "\n\nOr manually add @AMSuserbot to your Groups and try again</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> Assistant Bot is not in this group, Ask admin to add Assistant Bot manually</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Looking for `{queryy}` from deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit("Not Found Any Song!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton("β Support", url="https://t.me/AMSuserbot") ], [InlineKeyboardButton("Owner", url="https://t.me/AMSuserbot") ], [InlineKeyboardButton(text="π Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text( f"#οΈβ£ The song you requested is **In Queue** in position {position}" ) else: await res.edit_text("Playing.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"πΌοΈ **Now Playing **Song [{title}]({url}) Via Deezer") os.remove("final.png")
# Made By Devanagaraj # https://github.com/Devanagaraj # Thanks to ARQ API import os from aiohttp import ClientSession from Python_ARQ import ARQ from userge import Config, Message, userge from userge.plugins.misc.download import url_download ARQ_KEY = os.environ.get("ARQ_KEY", None) # ARQ API session = ClientSession() arq = ARQ("https://thearq.tech", ARQ_KEY, session) saavn = arq.saavn LOGGER = userge.getLogger(__name__) @userge.on_cmd( "music", about={ "header": "Search and Download Music", "description": "It Searches and Downloads Music from JioSaavn in HQ", "examples": "{tr}music name", }, ) async def music(message: Message): if not ARQ_KEY:
InlineQueryResultPhoto, InputTextMessageContent, ) from Python_ARQ import ARQ from search_engine_parser import GoogleSearch from DaisyX import BOT_USERNAME, OWNER_ID from DaisyX.config import get_str_key from DaisyX.function.pluginhelpers import convert_seconds_to_minutes as time_convert from DaisyX.function.pluginhelpers import fetch from DaisyX.services.pyrogram import pbot ARQ_API = get_str_key("ARQ_API", required=True) SUDOERS = OWNER_ID ARQ_API_URL = "https://thearq.tech" arq = ARQ(ARQ_API_URL, ARQ_API) app = pbot import socket async def _netcat(host, port, content): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) s.sendall(content.encode()) s.shutdown(socket.SHUT_WR) while True: data = s.recv(4096).decode("utf-8").strip("\n\x00") if not data: break return data
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Processing...**\n Mohon Tunggu Sebentar.") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "MusicVCGRobot" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan Saya Menjadi Admin Terlebih Dahulu.</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "Saya Bergabung Dengan Group ini Untuk Memainkan Musik di VCG." ) await lel.edit( "<b>Robot Telah Bergabung Kedalam Group.</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \n {user.first_name} Tidak Dapat Bergabung Dengan Grup Anda Karena Banyaknya Permintaan Untuk Assistant Saya. Pastikan @AssistantMusicVCGRobot Tidak Dilarang Didalam Group." "\n\nAtau Tambahkan @AssistantMusicVCGRobot ke Grup Anda Secara Manual dan Coba Lagi.</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> {user.first_name} Sedang Tidak Dalam Obrolan Ini, Minta Kepada Admin Untuk Menekan Β» /joingroup Untuk Pertama Kalinya atau Tambahkan {user.first_name} Secara Manual.</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Mencari Lagu `{queryy}` Di Deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Lagu Tidak Dapat Ditemukan, Anda Harus Menggunakan Ejaan Dengan Benar!" ) is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [InlineKeyboardButton(text="Listen On Deezer π¬", url=f"{url}") ], [InlineKeyboardButton(text="β Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"MusicVCGRobot = #οΈβ£ Antrian Di Posisi {position}" ) else: await res.edit_text("MusicVCGRobot = βΆοΈ Playing.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"Sedang Memutar [{title}]({url}) Via Deezer") os.remove("final.png")
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π Processing...") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "Irama_Musik" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid,wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "#Jadikan saya admin terlebih dahulu**", ) return try: await USER.join_chat(invitelink) await USER.send_message(message_.chat.id,"**Saya bergabung kesini didedikasi untuk memutar/mendownload lagu dan musik**") await lel.edit( "**@Irama_Musik bergabung ke grup**", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"**#Maaf @Irama_Musik tidak dapat bergabung, Pastikan dia tidak dibanned**" "\n\n**Atau add @Irama_Musik secara manual dengan tambahkan anggota!**", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"**#Masukkan @Irama_Musik terlebih dahulu**" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Mencari Untuk **{queryy}** Via Deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "#Tidak Ditemukan Apapun!" ) is_playing = False return keyboard = InlineKeyboardMarkup( [ [ InlineKeyboardButton( text="ΙͺΙ΄κ±α΄α΄Ι’Κα΄α΄", url=f"https://www.instagram.com/hendraputraaaaaa"), InlineKeyboardButton( text="Ι’Κα΄α΄α΄ α΄α΄κ±Ιͺα΄", url=f"https://t.me/vcgsupportgroup"), ] ] ) file_path= await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"**IramaMusik**= #οΈβ£ Queued at position {position}") else: await res.edit_text("Playing...") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"π· **Judul:** [{title[:60]}]({url})\nβ± **Durasi:** {duration}\n" \ + f"π‘ **Status:** `Playing`\nπ§ **Permintaan:** {requested_by}" ), os.remove("final.png")
MOD_NOLOAD = [] bot_start_time = time.time() if not HEROKU: app2 = Client("userbot", phone_number=PHONE_NUMBER, api_id=API_ID, api_hash=API_HASH) else: app2 = Client(SESSION_STRING, api_id=API_ID, api_hash=API_HASH) # Bot client app = Client("wbb", bot_token=BOT_TOKEN, api_id=API_ID, api_hash=API_HASH) # MongoDB client mongo_client = MongoClient(MONGO_DB_URI) db = mongo_client.wbb # ARQ client arq = ARQ(ARQ_API_BASE_URL) # Telegram client telegraph = Telegraph() telegraph.create_account(short_name="wbb") session = aiohttp.ClientSession() # Spamwatch client spamwatch = spamwatch_.Client(SPAMWATCH_API_KEY) BOT_ID = 0 BOT_NAME = "" BOT_USERNAME = "" BOT_MENTION = "" BOT_DC_ID = 0 USERBOT_ID = 0 USERBOT_NAME = "" USERBOT_USERNAME = ""
session_name, api_id=API_ID, api_hash=API_HASH, bot_token=TOKEN, ) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Data Center β’ Mumbai β’ MongoDB Database") mongodb = MongoClient(MONGO_DB_URL, MONGO_PORT)[MONGO_DB] motor = motor_asyncio.AsyncIOMotorClient(MONGO_DB_URL) db = motor[MONGO_DB] engine = AIOEngine(motor, MONGO_DB) print("[INFO]: INITIALZING AIOHTTP SESSION") aiohttpsession = ClientSession() # ARQ Client print("[INFO]: INITIALIZING ARQ CLIENT") arq = ARQ(ARQ_API_URL, ARQ_API_KEY, aiohttpsession) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Data Center β’ Mumbai β’ PostgreSQL Database" ) ubot = TelegramClient(StringSession(STRING_SESSION), APP_ID, APP_HASH) print( "[CUTIEPII]: Connecting To YΕ«ki β’ Cutiepii Userbot (t.me/Awesome_Cutiepii)" ) timeout = httpx.Timeout(40, pool=None) http = httpx.AsyncClient(http2=True, timeout=timeout) async def get_entity(client, entity): entity_client = client if not isinstance(entity, Chat): try:
from sample_config import SESSION_STRING queue = [] # This is where the whole song queue is stored playing = False # Tells if something is playing or not call = {} # Pyrogram Client if not HEROKU: app = Client("tgvc", api_id=API_ID, api_hash=API_HASH) else: app = Client(SESSION_STRING, api_id=API_ID, api_hash=API_HASH) # Pytgcalls Client # Arq Client arq = ARQ(ARQ_API, "YCLZTK-LIFRNJ-VZNBYY-ISCQAN-ARQ") async def delete(message): await asyncio.sleep(10) await message.delete() @app.on_message( filters.command("start") & ~filters.private & (filters.user(SUDOERS) | filters.chat(SUDO_CHAT_ID))) async def start(_, message): await message.reply_text(START_TEXT, quote=False)
from youtube_dl import YoutubeDL import asyncio from config import DURATION_LIMIT from helpers.errors import DurationLimitError from helpers.filters import command, other_filters from helpers.decorators import errors, authorized_users_only from helpers.player import ytplay, play_song from Python_ARQ import ARQ import logging logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) # Arq Client arq = ARQ("https://thearq.tech") ydl_opts = { "format": "bestaudio/best", "geo-bypass": True, "nocheckcertificate": True, "outtmpl": "%(id)s.%(ext)s", } ydl = YoutubeDL(ydl_opts) @Client.on_message(command("play") & other_filters) @errors @authorized_users_only async def play(client, message: Message):
from pyrogram.methods.messages.download_media import DEFAULT_DOWNLOAD_DIR from pyrogram.types import Message from utils import mp, RADIO from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from Python_ARQ import ARQ from youtube_search import YoutubeSearch from pyrogram import Client from aiohttp import ClientSession import re LOG_GROUP = Config.LOG_GROUP DURATION_LIMIT = Config.DURATION_LIMIT ARQ_API = Config.ARQ_API session = ClientSession() arq = ARQ("https://thearq.tech", ARQ_API, session) playlist = Config.playlist ADMINS = Config.ADMINS CHAT = Config.CHAT LOG_GROUP = Config.LOG_GROUP playlist = Config.playlist @Client.on_message(filters.command("play") | filters.audio & filters.private) async def yplay(_, message: Message): type = "" yturl = "" ysearch = "" if message.audio: type = "audio"
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Sedang Memproses Lagu-mu!**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "Crystal Music!" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan saya sebagai admin grup Anda terlebih dahulu</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "Saya bergabung dengan grup ini untuk memainkan musik di VCG" ) await lel.edit( "<b>Assisten bot bergabung dengan obrolan Anda</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error \nAssistant Bot tidak dapat bergabung dengan grup Anda karena banyaknya permintaan bergabung untuk bot! Pastikan pengguna tidak dibanned/blokir dalam grup." "\n\nAtau tambahkan secara manual @assistencrystal ke Grup Anda dan coba lagi</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i> Assistant Bot tidak ada dalam grup ini, Minta admin untuk tambahkan Assistant Bot secara manual</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Sedang Mencari Lagu-mu!..... `{queryy}` dari deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit("Tidak Ditemukan Lagu Apa Pun!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('πΆ Daftar Putar', callback_data='playlist'), InlineKeyboardButton("Menu β―", callback_data='menu') ], [ InlineKeyboardButton("β¨ Owner Aku!", url="https://t.me/afterdaytoxic") ], [InlineKeyboardButton(text="β Tutup!", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text( f"#οΈβ£ Lagu yang Anda minta **Sedang Antri** di posisi {position}") else: await res.edit_text("Lagu sudah di-mulai!.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"β‘ **Sedang Memutar** Lagu [{title}]({url}) Via Deezer") os.remove("final.png")
# Made By Devanagaraj # Reference https://github.com/Devanagaraj/Tg_Meowzik_Bot # Thanks to ARQ API import os from aiohttp import ClientSession from Python_ARQ import ARQ from userge import config, Message, userge from .. import music from ...misc.download import url_download # ARQ API session = ClientSession() arq = ARQ("https://thearq.tech", music.ARQ_KEY, session) if music.ARQ_KEY else None LOGGER = userge.getLogger(__name__) @userge.on_cmd( "saavn", about={ "header": "Search and Download Music", "description": "It Searches and Downloads Music from JioSaavn in HQ", "examples": "{tr}saavn name", }, ) async def savn(message: Message): if not music.ARQ_KEY: return await message.err(
# Reference https://github.com/Devanagaraj/Tg_Meowzik_Bot # Thanks to ARQ API import os from aiohttp import ClientSession from Python_ARQ import ARQ from userge import Config, Message, userge from userge.plugins.misc.download import url_download ARQ_KEY = os.environ.get("ARQ_KEY", None) # ARQ API session = ClientSession() arq = ARQ("https://thearq.tech", ARQ_KEY, session) if ARQ_KEY else None LOGGER = userge.getLogger(__name__) @userge.on_cmd( "saavn", about={ "header": "Search and Download Music", "description": "It Searches and Downloads Music from JioSaavn in HQ", "examples": "{tr}saavn name", }, ) async def savn(message: Message): if not ARQ_KEY: return await message.err(
from sample_config import SESSION_STRING queue = [] # This is where the whole song queue is stored playing = False # Tells if something is playing or not call = {} # Pyrogram Client if not HEROKU: app = Client("tgvc", api_id=API_ID, api_hash=API_HASH) else: app = Client(SESSION_STRING, api_id=API_ID, api_hash=API_HASH) # Pytgcalls Client # Arq Client arq = ARQ(ARQ_API, ARQ_API_KEY) async def delete(message): await asyncio.sleep(10) await message.delete() @app.on_message( filters.command("start") & ~filters.private & (filters.user(SUDOERS) | filters.chat(SUDO_CHAT_ID))) async def start(_, message): await message.reply_text(START_TEXT, quote=False)
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Proses..**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "π₯ππ‘ππ’π π π¨π¦ππ" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan Saya Sebagai Admin di grup anda.</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "Saya Telah bergabung dalam obrolan untuk memulai musik." ) await lel.edit( "<b>@asistan_random userbot telah bergabung.</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nUser {user.first_name} mungkin sudah melebihi kapasitas pemutaran." "\n\nOr invit manual @asistan_random dan mencoba play ulang </b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i>Bot Tidak Bisa menjalan kan, Karna terjadi sesuatu hal, Coba Invite Asisstan secara manual @random_asisstan</i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Searching πππ for `{queryy}` on deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Found Literally Nothing, You Should Work On Your English!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [InlineKeyboardButton(text="Listen On Deezer π¬", url=f"{url}") ], [InlineKeyboardButton(text="β Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text( f"β―π₯ππ‘ππ’π π π¨π¦ππβ―=#οΈβ£ Mengantri di posisi {position}") else: await res.edit_text("β―π₯ππ‘ππ’π π π¨π¦ππβ―=βΆοΈ Dimulai.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo(chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"Playing [{title}]({url}) Via Deezer") os.remove("final.png")
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Memproses**") administrators = await get_administrators(message_.chat) chid = message_.chat.id try: user = await USER.get_me() except: user.first_name = "musicwan" usar = user wew = usar.id try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid, wew) except: for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Add me as admin of yor group first</b>", ) return try: await USER.join_chat(invitelink) await USER.send_message( message_.chat.id, "I joined this group for playing music in VC") await lel.edit( "<b>@musicwan userbot joined your chat</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) await lel.edit( f"<b>π΄ Flood Wait Error π΄ \nUser {user.first_name} tidak dapat bergabung dengan grup Anda karena banyaknya permintaan untuk userbot! Pastikan pengguna tidak dilarang dalam grup." "\n\nOr tambahkan @musicwan ke Grup Anda secara manual dan coba lagi</b>", ) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( f"<i>Sepertinya @musicwan Userbot tidak ada dalam obrolan ini, </Minta admin untuk mengirim / memainkan perintah untuk pertama kali atau adMinta admin untuk mengirim /play /help perintah untuk pertama kalinya atau tambahkan asisten secara manual <i>" ) return requested_by = message_.from_user.first_name text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Mencari πππ di `{queryy}` on deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Found Literally Nothing, You Should Work On Your English!") is_playing = False return keyboard = InlineKeyboardMarkup([[ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [InlineKeyboardButton(text="Listen On Deezer π¬", url=f"{url}") ], [InlineKeyboardButton(text="β Close", callback_data='cls')]]) file_path = await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"#οΈβ£ Sedang dalam antrian di {position}") else: await res.edit_text("βΆοΈ Playing.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo(chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"Playing [{title}]({url}) Via Deezer") os.remove("final.png")
from DaisyXMusic.helpers.channelmusic import get_chat_id from DaisyXMusic.helpers.errors import DurationLimitError from DaisyXMusic.helpers.decorators import errors from DaisyXMusic.helpers.decorators import authorized_users_only from DaisyXMusic.helpers.filters import command from DaisyXMusic.helpers.filters import other_filters from DaisyXMusic.helpers.gets import get_file_name from DaisyXMusic.services.callsmusic import callsmusic from DaisyXMusic.services.callsmusic import client as USER from DaisyXMusic.services.converter.converter import convert from DaisyXMusic.services.downloaders import youtube from DaisyXMusic.services.queues import queues aiohttpsession = aiohttp.ClientSession() chat_id = None arq = ARQ("https://thearq.tech", ARQ_API_KEY, aiohttpsession) DISABLED_GROUPS = [] useer ="NaN" def cb_admin_check(func: Callable) -> Callable: async def decorator(client, cb): admemes = a.get(cb.message.chat.id) if cb.from_user.id in admemes: return await func(client, cb) else: await cb.answer("You ain't allowed!", show_alert=True) return return decorator def transcode(filename):
async def deezer(client: Client, message_: Message): global que lel = await message_.reply("π **Sedang Memproses...**") administrators = await get_administrators(message_.chat) chid = message_.chat.id usar = await USER.get_me() wew = usar.id for administrator in administrators: if administrator == message_.from_user.id: try: invitelink = await client.export_chat_invite_link(chid) except: await lel.edit( "<b>Tambahkan saya sebagai admin grup Anda terlebih dahulu</b>", ) return try: await USER.join_chat(invitelink) await lel.edit( "<b>Asisten bot bergabung dengan obrolan Anda</b>", ) except UserAlreadyParticipant: pass except Exception as e: #print(e) #await lel.edit( # f"<b>Pengguna {user.first_name} tidak bisa bergabung dengan grup Anda! Pastikan pengguna tidak diblokir dalam grup." # "\n\nAtau tambahkan @assistencrystal ke Grup Anda secara manual dan coba lagi</b>", #) pass try: chatdetails = await USER.get_chat(chid) #lmoa = await client.get_chat_member(chid,wew) except: await lel.edit( "<i>Asisten userbot tidak ada dalam obrolan ini, Minta admin untuk mengirim /play perintah untuk pertama kalinya atau menambahkan asisten secara manual</i>" ) return requested_by = message_.from_user.first_name try: #chatdetails = await USER.get_chat(chid) lmoa = await client.get_chat_member(chid,wew) except: await lel.reply( "<i>Sepertinya Asisten Userbot tidak ada dalam obrolan ini, Minta admin untuk mengirim /play perintah untuk pertama kalinya atau menambahkan asisten secara manual</i>" ) pass text = message_.text.split(" ", 1) queryy = text[1] res = lel await res.edit(f"Sedang mencari...π lagu `{queryy}` di deezer") try: arq = ARQ("https://thearq.tech") r = await arq.deezer(query=queryy, limit=1) title = r[0]["title"] duration = int(r[0]["duration"]) thumbnail = r[0]["thumbnail"] artist = r[0]["artist"] url = r[0]["url"] except: await res.edit( "Lagu tidak ditemukan! Coba cari dengan judul lagu yang lebih jelas!" ) is_playing = False return keyboard = InlineKeyboardMarkup( [ [ InlineKeyboardButton('π Playlist', callback_data='playlist'), InlineKeyboardButton('Menu β― ', callback_data='menu') ], [ InlineKeyboardButton( "Group Aku!", url="https://t.me/humangabutguys" ), InlineKeyboardButton( "Owner Aku!", url="https://t.me/afterdaytoxic" ) ], [ InlineKeyboardButton( text="Tutup", callback_data='cls') ] ] ) file_path= await converter.convert(wget.download(url)) await res.edit("Generating Thumbnail") await generate_cover(requested_by, title, artist, duration, thumbnail) if message_.chat.id in callsmusic.pytgcalls.active_calls: await res.edit("adding in queue") position = await queues.put(message_.chat.id, file=file_path) qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) await res.edit_text(f"Sedang memainkan [{title}]({url}) via Deezer") else: await res.edit_text("πΆ Memutar Lagu.....") chat_id = message_.chat.id que[chat_id] = [] qeue = que.get(message_.chat.id) s_name = title r_by = message_.from_user loc = file_path appendable = [s_name, r_by, loc] qeue.append(appendable) callsmusic.pytgcalls.join_group_call(message_.chat.id, file_path) await res.delete() m = await client.send_photo( chat_id=message_.chat.id, reply_markup=keyboard, photo="final.png", caption=f"β¬Irama Musikβ¬ > #οΈβ£ Mengantri di posisi {position}.)." ) os.remove("final.png")