changed youtubedl.py to just assume cwd is wrong

This commit is contained in:
phixxy 2024-09-04 20:29:58 -07:00
parent 8fb5f1bee8
commit 73679351d3
2 changed files with 5 additions and 6 deletions

View file

@ -16,9 +16,8 @@ class YoutubeDL(BotBaseCog):
url = ctx.message.content.split(" ", 1)[1]
url = '"' + url + '"'
video_or_audio = ctx.message.content.split(" ", 2)[2]
working_dir = f"{os.getcwd()}/data/ytdl/"
process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio], cwd=working_dir)
await ctx.send(f"Downloading {video_or_audio} from {url}...", embeds=None)
process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio])
await ctx.send(f"Downloading {video_or_audio} from {url}...", suppress_embeds=True)
except:
await ctx.send("Usage: !youtubedl <url> <video|audio>")