From 9b6f2b467a466f92ae8da972228e91aa02fa4114 Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Thu, 14 May 2020 17:44:48 +0200
Subject: [PATCH] added support for error 403

---
 commands/fun/ytp.js          | 2 +-
 commands/utility/download.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js
index 7f9372ac..b9e7a6f2 100644
--- a/commands/fun/ytp.js
+++ b/commands/fun/ytp.js
@@ -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?');
diff --git a/commands/utility/download.js b/commands/utility/download.js
index 7dce8b61..24c8d59f 100644
--- a/commands/utility/download.js
+++ b/commands/utility/download.js
@@ -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.');