forked from Supositware/Haha-Yes
better error message if bot is blocked
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
3cff522147
commit
17f2a38e8d
1 changed files with 1 additions and 0 deletions
|
@ -188,6 +188,7 @@ class ytpCommand extends Command {
|
||||||
return downloader(url, options, `./asset/ytp/userVid/${message.id}.mp4`)
|
return downloader(url, options, `./asset/ytp/userVid/${message.id}.mp4`)
|
||||||
.on('error', (err) => {
|
.on('error', (err) => {
|
||||||
loadingmsg.delete();
|
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.');
|
||||||
return message.channel.send(err, { code: true });
|
return message.channel.send(err, { code: true });
|
||||||
})
|
})
|
||||||
.on('end', async output => {
|
.on('end', async output => {
|
||||||
|
|
Loading…
Reference in a new issue