From 9b49fb70c5f0d5500cc27388ec1bcf1680440866 Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Wed, 18 Mar 2020 13:12:14 +0100
Subject: [PATCH] fix command

---
 commands/utility/color.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/utility/color.js b/commands/utility/color.js
index 33741522..da9b4381 100644
--- a/commands/utility/color.js
+++ b/commands/utility/color.js
@@ -57,7 +57,7 @@ class colorCommand extends Command {
 		];
 
 		if (args.color.match(/^#[0-9A-F]{6}$/i) || ColorResolvable.includes(args.color.toLowerCase()) || colors.includes(args.color.toLowerCase())) {
-			let role = message.guild.roles.find(role => role.name === args.color);
+			let role = message.guild.roles.cache.find(role => role.name === args.color);
 			if (!role) {
 				message.guild.roles.create({
 					data: {
@@ -68,7 +68,7 @@ class colorCommand extends Command {
 					reason: 'Color command'
 				});
 				return message.channel.send('Role created! try again to apply it to yourself!');
-			} else if (message.guild.member(message.author).roles.has(role.id)) {
+			} else if (message.guild.member(message.author).roles.cache.has(role.id)) {
 				message.guild.member(message.author).roles.remove(role);
 				return message.channel.send('Role removed!');
 			}