Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sudo apt-get install youtube-dl -y

3) Cloning the Repo
```bash
git clone https://github.com/lushaimusic/vc-userbot
git clone https://github.com/AzeMusic/vc-userbot
cd vc-userbot
```

Expand Down
10 changes: 5 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "vc-userbot",
"description": "A Telegram Userbot to play Songs/Videos/Radio/ Live Stream in Voice Chat",
"description": "Mahnıları/Videoları/Radioları/Səsli Çatda Canlı Yayımı oynamaq üçün Telegram İstifadəçi Botu ",
"logo": "https://telegra.ph/file/26effbfca2917f15a9e5e.png",
"keywords": [
"Telegram",
"VCBot",
"MusicPlayer"
],
"repository": "https://github.com/lushaimusic/vc-userbot",
"repository": "https://github.com/AzeMusic/vc-userbot",
"env": {
"SESSION": {
"description": "Pyrogram String Session. Get from https://replit.com/@ZauteKm/GenerateStringSession",
"description": "Pyrogram String Session",
"required": true
},
"API_ID": {
Expand All @@ -22,12 +22,12 @@
"required": true
},
"HNDLR": {
"description": "Handler | Default (!)",
"description": "İşləyici | Defolt (!)",
"value": "!",
"required": false
},
"GROUP_MODE": {
"description": "Anyone can play, if set to True. Set it to False to restrict play access to Sudo Users/Contacts only",
"description": "True olaraq təyin olunarsa, hər kəs oynaya bilər. Yalnız Sudo İstifadəçiləri/Kontaktlar üçün oyun girişini məhdudlaşdırmaq üçün onu False olaraq təyin edin",
"value": "True",
"required": true
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/vc/handlers.py → plaginlər/vc/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ async def on_end_handler(client, update: Update):
print(chat_id)
op = await skip_current_song(chat_id)
if op==1:
await bot.send_message(chat_id, "`Queue is Empty, Leaving Voice Chat...`")
await bot.send_message(chat_id, "`Növbə Boşdur, Səsli Çatı tərk edir...`")
elif op==2:
await bot.send_message(chat_id, "**Some Error Occurred** \n`Clearing the Queues and Leaving the Voice Chat...`")
await bot.send_message(chat_id, "**Xəta Baş Verdi** \n `Növbələrin Təmizlənməsi və Səsli Söhbətdən Çıxılması...`")
else:
await bot.send_message(chat_id, f"**🎧 Now Playing** \n[{op[0]}]({op[1]}) | `{op[2]}`", disable_web_page_preview=True)
await bot.send_message(chat_id, f"**🎧 indi oxuyur** \n[{op[0]}]({op[1]}) | `{op[2]}`", disable_web_page_preview=True)
else:
pass


# When someone ends the Voice Chat without stopping the Playback
# Kimsə Oxumanı dayandırmadan Səsli Söhbəti bitirdikdə

@call_py.on_closed_voice_chat()
async def close_handler(client: PyTgCalls, chat_id: int):
Expand Down
30 changes: 15 additions & 15 deletions plugins/modules/song_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ async def song(client, message: Message):
if not urlissed:
await client.send_message(
message.chat.id,
f"⚠️ Check spelling!\n\nExample: `{HNDLR}song monody`", reply_to_message_id=reply_id
f"⚠️ Check spelling!\n\nExample: `{HNDLR}song nazli qizim`", reply_to_message_id=reply_id
)
return
pablo = await client.send_message(message.chat.id, f"**🔎 Searching** `{urlissed}`", reply_to_message_id=reply_id)
pablo = await client.send_message(message.chat.id, f"**🔎 axtarilir** `{urlissed}`", reply_to_message_id=reply_id)
search = SearchVideos(f"{urlissed}", offset=1, mode="dict", max_results=1)
mi = search.result()
mio = mi["search_result"]
mio = mi[axtaris_neticesi"]
mo = mio[0]["link"]
mio[0]["duration"]
mio[0]["muddet"]
thum = mio[0]["title"]
fridayz = mio[0]["id"]
mio[0]["channel"]
mio[0]["kanal"]
kekme = f"https://img.youtube.com/vi/{fridayz}/hqdefault.jpg"
await asyncio.sleep(0.6)
sedlyf = wget.download(kekme)
Expand All @@ -56,13 +56,13 @@ async def song(client, message: Message):
],
"outtmpl": "%(id)s.mp3",
"quiet": True,
"logtostderr": False,
"logtostderr": True,
}
try:
with YoutubeDL(opts) as ytdl:
ytdl_data = ytdl.extract_info(mo, download=True)
except Exception as e:
await pablo.edit(f"**Failed To Download** \n**Error :** `{str(e)}`")
await pablo.edit(f"**endirmək alinmadi** \n**Error :** `{str(e)}`")
return
c_time = time.time()
capy = f"""
Expand All @@ -81,7 +81,7 @@ async def song(client, message: Message):
progress_args=(
pablo,
c_time,
f"**📥 Download** `{urlissed}`",
f"**📥 yuklənir** `{urlissed}`",
file_stark,
),
)
Expand Down Expand Up @@ -124,7 +124,7 @@ async def progress(current, total, message, start, type_of_ps, file_name=None):
elapsed_time = round(diff) * 1000
if elapsed_time == 0:
return
time_to_completion = round((total - current) / speed) * 1000
time_to_completion = round((total - current) / speed) * 10000
estimated_total_time = elapsed_time + time_to_completion
progress_str = "{0}{1} {2}%\n".format(
"".join("▣" for i in range(math.floor(percentage / 10))),
Expand All @@ -138,7 +138,7 @@ async def progress(current, total, message, start, type_of_ps, file_name=None):
if file_name:
try:
await message.edit(
"{}\n**File Name:** `{}`\n{}".format(type_of_ps, file_name, tmp)
"{}\n**File Name:** `{}`\n{}".format(type_of_ps, fayl_adi, tmp)
)
except FloodWait as e:
await asyncio.sleep(e.x)
Expand Down Expand Up @@ -176,7 +176,7 @@ def get_readable_time(seconds: int) -> int:
time_suffix_list = ["s", "m", "h", "days"]
while count < 4:
count += 1
remainder, result = divmod(seconds, 60) if count < 3 else divmod(seconds, 24)
remainder, result = divmod(seconds, 10) if count < 3 else divmod(seconds, 15)
if seconds == 0 and remainder == 0:
break
time_list.append(int(result))
Expand Down Expand Up @@ -237,7 +237,7 @@ async def vsong(client, message: Message):
reply_id = message.reply_to_message.message_id if message.reply_to_message else message.message_id

pablo = await client.send_message(
message.chat.id, f"**🔎 Searching..** `{urlissed}`", reply_to_message_id=reply_id
message.chat.id, f"**🔎 axtarilir..** `{urlissed}`", reply_to_message_id=reply_id
)
if not urlissed:
await pablo.edit("Invalid Command Syntax Please Check help Menu To Know More!")
Expand Down Expand Up @@ -270,12 +270,12 @@ async def vsong(client, message: Message):
with YoutubeDL(opts) as ytdl:
ytdl_data = ytdl.extract_info(url, download=True)
except Exception as e:
await event.edit(event, f"**Download Failed** \n**Error :** `{str(e)}`")
await event.edit(event, f"**endirme uğursuz** \n**Error :** `{str(e)}`")
return
c_time = time.time()
file_stark = f"{ytdl_data['id']}.mp4"
capy = f"""
**🏷️ Video :** [{thum}]({mo})
**🌹 Video :** [{thum}]({mo})
"""
await client.send_video(
message.chat.id, reply_to_message_id=reply_id,
Expand All @@ -289,7 +289,7 @@ async def vsong(client, message: Message):
progress_args=(
pablo,
c_time,
f"**📥 Download** `{urlissed}`",
f"**📥 yüklenir** `{urlissed}`",
file_stark,
),
)
Expand Down
34 changes: 17 additions & 17 deletions plugins/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def ping(client, m: Message):
delta_ping = time() - start
uptime_sec = (current_time - START_TIME).total_seconds()
uptime = await _human_time_duration(int(uptime_sec))
await m_reply.edit(f"`{delta_ping * 1000:.3f} ms` \n**Uptime ⏳** - `{uptime}`")
await m_reply.edit(f"`{delta_ping * 1000:.3f} ms` \n**pong🇦🇿🔥** - `{uptime}`")

@Client.on_message(contact_filter & filters.command(['restart'], prefixes=f"{HNDLR}"))
async def restart(client, m: Message):
Expand All @@ -49,29 +49,29 @@ async def restart(client, m: Message):
@Client.on_message(contact_filter & filters.command(['help'], prefixes=f"{HNDLR}"))
async def help(client, m: Message):
HELP = f"""
**HELP MENU 🛠**
**Komandalar 🌹**

**USER COMMANDS**
(Anyone can Use if `GROUP_MODE` is set to `True`):
`{HNDLR}play`
`{HNDLR}vplay`
**User komandalar**
(İstifadə edilir):
`{HNDLR}play` (mahnı adı/link)
`{HNDLR}vplay` (video ad/link)
`{HNDLR}stream` (For Radio links)
`{HNDLR}vstream` (For .m3u8 / live links)
`{HNDLR}playfrom [channel] ; [n]` - Plays last n songs from channel
`{HNDLR}vstream` (For .m3u8 / radio link)
`{HNDLR}playfrom [kanal] ; [n]` - kanalda mahnı oxudmaq
`{HNDLR}playlist` / `{HNDLR}queue`

**SUDO COMMANDS** (Can only be accessed by You and Your Contacts):
`{HNDLR}ping`
**SUDO komandalar**
`{HNDLR}ping`
`{HNDLR}skip`
`{HNDLR}pause` and `{HNDLR}resume`
`{HNDLR}stop`
`{HNDLR}end`
`{HNDLR}help`
`{HNDLR}restart`
`{HNDLR}stop` (saxla)
`{HNDLR}end` (video chatdan endir)
`{HNDLR}help` komandalar
`{HNDLR}restart` yenidən başlat

**EXTRA COMMANDS**
`{HNDLR}song` - Download Song from Youtube server.
`{HNDLR}video` - Download Video from Youtube server.
**EXTRA komandalar**
`{HNDLR}song` - youtubdən mahnı yuklə.
`{HNDLR}video` - youtubdən video yuklê
`{HNDLR}json` - Reply any message & Showing Json.
"""
await m.reply(HELP)