@ -17,7 +17,8 @@ class DownloadCommand extends Command {
type:'url',
prompt:{
start:'Please send the URL of which video you want to download. Say `cancel` to stop the command',
retry:'Please send a valid URL of the video you want to download. Say `cancel` to stop the command'
retry:'Please send a valid URL of the video you want to download. Say `cancel` to stop the command',
optional:true
},
},
{
@ -32,22 +33,52 @@ class DownloadCommand extends Command {
},
{
id:'proxy',
match:'option',
flag:['--proxy'],
},
{
id:'listproxy',
match:'flag',
flag:['--proxy']
flag:['--listproxy','--proxylist']
}
],
description:{
content:'Download videos from different website from the link you provided, use "-s" to make the vid a spoiler',
content:'Download videos from different website from the link you provided, use `-s` to make the vid a spoiler, `--proxy #` to select a proxy, `--listproxy` to see a list of proxy',
usage:'[link] [caption]',
examples:['https://www.youtube.com/watch?v=6n3pFFPSlW4 Look at this funny gnome']
examples:['https://www.youtube.com/watch?v=6n3pFFPSlW4 Look at this funny gnome', 'https://www.youtube.com/watch?v=6n3pFFPSlW4 --proxy 1']
}
});
}
asyncexec(message,args){
if(!args.link)returnmessage.channel.send('Please try again with a valid URL.');
if(err.includes('HTTP Error 429: Too Many Requests'))returnmessage.channel.send('`HTTP Error 429: Too Many Requests.`\nThe website you tried to download from probably has the bot blocked, you can try again with the `--proxy` option and hope it work.');