From 666477a152e6dd3a11537da50cb14fc7859ec989 Mon Sep 17 00:00:00 2001
From: Supositware <loic.bersier1@gmail.com>
Date: Mon, 1 Apr 2019 01:51:48 +0200
Subject: [PATCH] fixed the command, i think

---
 commands/owner/botAvatar.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/commands/owner/botAvatar.js b/commands/owner/botAvatar.js
index f2f75c68..59dbdb28 100644
--- a/commands/owner/botAvatar.js
+++ b/commands/owner/botAvatar.js
@@ -10,7 +10,6 @@ class BotAvatarCommand extends Command {
 				{
 					id: 'image',
 					type:'string',
-					optional: true,
 					match: 'rest'
 				}
 			],
@@ -27,6 +26,11 @@ class BotAvatarCommand extends Command {
 		let image = args.image;
 		if (!Attachment[0] && !image)
 			return message.say('You didint provide any images');
+		else if (image && !Attachment[0]) {
+			this.client.user.setAvatar(image)
+				.catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?'));
+			return message.channel.send('The avatar have been changed succesfully');
+		}
 		else 
 			image = Attachment[0].url;