log errors properly
This commit is contained in:
parent
b91df5435d
commit
9fb5b023d0
1 changed files with 3 additions and 3 deletions
|
|
@ -20,9 +20,9 @@ class YoutubeDL(BotBaseCog):
|
|||
video_or_audio = ctx.message.content.split(" ")[2]
|
||||
process = subprocess.Popen(["python3", "data/ytdl/youtubedl.py", url, video_or_audio])
|
||||
process.wait()
|
||||
logging.error(process.stdout)
|
||||
logging.error(process.stderr)
|
||||
logging.error(process.returncode)
|
||||
self.logger.exception(process.stdout)
|
||||
self.logger.exception(process.stderr)
|
||||
self.logger.exception(process.returncode)
|
||||
await ctx.send(f"Downloading {video_or_audio} from {url}...", suppress_embeds=True)
|
||||
except Exception as e:
|
||||
await ctx.send(f"Error: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue