This commit is contained in:
Yasir Aris M 2023-11-03 09:27:32 +07:00
parent a29444235b
commit 5451153add

View file

@ -95,6 +95,7 @@ async def ytdownv2(self, ctx: Message, strings):
if not ctx.from_user: if not ctx.from_user:
return await ctx.reply_msg(strings("no_channel")) return await ctx.reply_msg(strings("no_channel"))
url = ctx.command[1] if ctx.command and len(ctx.command) > 1 else ctx.text url = ctx.command[1] if ctx.command and len(ctx.command) > 1 else ctx.text
self.log(not isValidURL(url))
if not isValidURL(url): if not isValidURL(url):
return await ctx.reply_msg(strings("invalid_link")) return await ctx.reply_msg(strings("invalid_link"))
async with iYTDL(log_group_id=0, cache_path="cache", silent=True) as ytdl: async with iYTDL(log_group_id=0, cache_path="cache", silent=True) as ytdl: