fixed quote being appended to url

This commit is contained in:
phixxy 2024-09-04 19:31:11 -07:00
parent 3964ec0fc2
commit 8b6a59e820

View file

@ -13,7 +13,8 @@ class YoutubeDL(BotBaseCog):
@commands.command() @commands.command()
async def youtubedl(self, ctx): async def youtubedl(self, ctx):
try: try:
url = f"\"{ctx.message.content.split(" ", 1)[1]}\"" url = f"{ctx.message.content.split(" ", 1)[1]}"
url = '"' + url + '"'
video_or_audio = ctx.message.content.split(" ", 2)[2] video_or_audio = ctx.message.content.split(" ", 2)[2]
process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio]) process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio])
process.wait() process.wait()