commit
d0f7376638
@ -27,10 +27,7 @@ from helpers.decorators import humanbytes
|
|||||||
|
|
||||||
@Client.on_message(command(["song", f"song@{Veez.BOT_USERNAME}"]) & ~filters.channel)
|
@Client.on_message(command(["song", f"song@{Veez.BOT_USERNAME}"]) & ~filters.channel)
|
||||||
def song(_, message):
|
def song(_, message):
|
||||||
query = ""
|
query = " ".join(message.command[1:])
|
||||||
for i in message.command[1:]:
|
|
||||||
query += " " + str(i)
|
|
||||||
print(query)
|
|
||||||
m = message.reply("🔎 finding song...")
|
m = message.reply("🔎 finding song...")
|
||||||
ydl_ops = {"format": "bestaudio[ext=m4a]"}
|
ydl_ops = {"format": "bestaudio[ext=m4a]"}
|
||||||
try:
|
try:
|
||||||
@ -238,7 +235,7 @@ async def vsong(client, message):
|
|||||||
'outtmpl':'%(title)s.%(ext)s',
|
'outtmpl':'%(title)s.%(ext)s',
|
||||||
'quite':True
|
'quite':True
|
||||||
}
|
}
|
||||||
query = message.command[1]
|
query = " ".join(message.command[1:])
|
||||||
try:
|
try:
|
||||||
results = YoutubeSearch(query, max_results=1).to_dict()
|
results = YoutubeSearch(query, max_results=1).to_dict()
|
||||||
link = f"https://youtube.com{results[0]['url_suffix']}"
|
link = f"https://youtube.com{results[0]['url_suffix']}"
|
||||||
|
Loading…
Reference in New Issue
Block a user