fixed cwd? hopefully
This commit is contained in:
parent
80b00b3aea
commit
8fb5f1bee8
1 changed files with 2 additions and 3 deletions
|
|
@ -16,9 +16,8 @@ class YoutubeDL(BotBaseCog):
|
||||||
url = ctx.message.content.split(" ", 1)[1]
|
url = ctx.message.content.split(" ", 1)[1]
|
||||||
url = '"' + url + '"'
|
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], cwd="data/ytdl/")
|
working_dir = f"{os.getcwd()}/data/ytdl/"
|
||||||
#process.wait()
|
process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio], cwd=working_dir)
|
||||||
#await ctx.send(process.stdout)
|
|
||||||
await ctx.send(f"Downloading {video_or_audio} from {url}...", embeds=None)
|
await ctx.send(f"Downloading {video_or_audio} from {url}...", embeds=None)
|
||||||
except:
|
except:
|
||||||
await ctx.send("Usage: !youtubedl <url> <video|audio>")
|
await ctx.send("Usage: !youtubedl <url> <video|audio>")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue