added support for error 403
This commit is contained in:
parent
1bbe7702d3
commit
9b6f2b467a
2 changed files with 2 additions and 2 deletions
|
@ -137,7 +137,7 @@ class ytpCommand extends Command {
|
|||
if (err) {
|
||||
console.error(err.toString());
|
||||
loadingmsg.delete();
|
||||
if (err.toString().includes('HTTP Error 429')) {
|
||||
if (err.toString().includes('HTTP Error 429') || err.toString().includes('HTTP Error 403')) {
|
||||
return message.channel.send('An error has occured, I can\'t download from the link you provided because the website has blocked the bot. Please try again later or upload that video as mp4 on another website.');
|
||||
} else {
|
||||
return message.channel.send('An error has occured, I can\'t download from the link you provided. Is it an mp4?');
|
||||
|
|
|
@ -76,7 +76,7 @@ class DownloadCommand extends Command {
|
|||
if (err) {
|
||||
console.error(err.toString());
|
||||
loadingmsg.delete();
|
||||
if (err.toString().includes('HTTP Error 429')) {
|
||||
if (err.toString().includes('HTTP Error 429') || err.toString().includes('HTTP Error 403')) {
|
||||
return message.channel.send('An error has occured, I can\'t download from the link you provided because the website has blocked the bot. Please try again later.');
|
||||
} else {
|
||||
return message.channel.send('An error has occured, I can\'t download from the link you provided.');
|
||||
|
|
Loading…
Reference in a new issue