diff --git a/commands/misc/dl.js b/commands/misc/dl.js index d86077f..3752e59 100644 --- a/commands/misc/dl.js +++ b/commands/misc/dl.js @@ -16,24 +16,21 @@ module.exports = { let url; if(args.length > 0){ - if(args[0].charAt(0) === '<' && args[0].charAt(args[0].length - 1) === '>'){ - args[0] = args[0].slice(0, args[0].length - 1) - } try { url = new URL(args[0]); url = url.href; } catch (error) { this.cleanUp(downloadsDir); - message.channel.send("Could not parse the provided argument as a URL."); + message.channel.send("Invalid URL"); return; } } else { this.cleanUp(downloadsDir); - return message.channel.send("You have to provide a URL in an argument.") + return message.channel.send("No url provided") } if(this.executeCommand(`yt-dlp "${url}" -P ${downloadsDir} --cookies ${cookieFilepath}`).error){ - message.channel.send("An error occured when downloading the video."); + message.channel.send("An error occured when executing the command"); this.cleanUp(downloadsDir); return; }