From 0c31f62e83703bc901681f29c3ae2e963a0dfe11 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 6 Sep 2020 22:53:17 +0200 Subject: [PATCH] Clearer description and error message Signed-off-by: loicbersier --- commands/fun/ytp.js | 4 ++-- commands/utility/download.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index cdf5ed0c..bbe86c0f 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -126,7 +126,7 @@ class ytpCommand extends Command { } ], description: { - content: 'Generate random ytp | --add with a link or attachment to add a video to the pool, only .mp4 work | --pool to see how many vid there is currently in the pool | --force to make the command work outside of nsfw channel BE AWARE THAT IT WON\'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN\n`--proxy #` to select a proxy, `--listproxy` to see a list of proxy', + content: 'Generate random ytp\n--add with a link or attachment to add a video to the pool, only .mp4 work\n--pool to see how many vid there is currently in the pool\n--force to make the command work outside of nsfw channel BE AWARE THAT IT WON\'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN\n`--proxy #` to select a proxy, `--listproxy` to see a list of proxy', usage: '(OPTIONAL) | [Minimum length of clip] [Max length of clip]', examples: ['5 10', '--add https://www.youtube.com/watch?v=6n3pFFPSlW4', '--add https://www.youtube.com/watch?v=6n3pFFPSlW4 --proxy 1', '--listproxy'] } @@ -188,7 +188,7 @@ class ytpCommand extends Command { return downloader(url, options, `./asset/ytp/userVid/${message.id}.mp4`) .on('error', (err) => { loadingmsg.delete(); - if (err.includes('HTTP Error 429: Too Many Requests')) return message.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.'); + if (err.includes('HTTP Error 429: Too Many Requests')) return message.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 ( can see the list of proxy with --listproxy ) and hope it work.'); return message.channel.send(err, { code: true }); }) .on('end', async output => { diff --git a/commands/utility/download.js b/commands/utility/download.js index e6299fe8..a3c6748c 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -43,7 +43,7 @@ class DownloadCommand extends Command { } ], description: { - 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', + content: 'Download videos from different website from the link you provided\n`-s` to make the video as a spoiler\n`--proxy #` to select a proxy\n`--listproxy` to see a list of proxy', usage: '[link] [caption]', examples: ['https://www.youtube.com/watch?v=6n3pFFPSlW4 Look at this funny gnome', 'https://www.youtube.com/watch?v=6n3pFFPSlW4 --proxy 1', '--listproxy'] } @@ -91,7 +91,7 @@ class DownloadCommand extends Command { downloader(args.link.href, args.proxy != null ? ['--proxy', proxy[args.proxy].ip] : null, `${os.tmpdir()}/${filename}.mp4`) .on('error', async err => { - if (err.includes('HTTP Error 429: Too Many Requests')) return message.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.'); + if (err.includes('HTTP Error 429: Too Many Requests')) return message.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 ( can see the list of proxy with --listproxy ) and hope it work.'); return message.channel.send(err, { code: true }); }) .on('end', async output => {