From 8e0f525d911ce27a8c6c34f0a6fa43107c206ddb Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Tue, 10 Sep 2019 15:44:49 +0200 Subject: [PATCH] fix(Role): throw TypeError in comparePositionTo (#3466) --- src/structures/Role.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Role.js b/src/structures/Role.js index ce9f36373..9c7ebd494 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -150,7 +150,7 @@ class Role extends Base { */ comparePositionTo(role) { role = this.guild.roles.resolve(role); - if (!role) return Promise.reject(new TypeError('INVALID_TYPE', 'role', 'Role nor a Snowflake')); + if (!role) throw new TypeError('INVALID_TYPE', 'role', 'Role nor a Snowflake'); return this.constructor.comparePositions(this, role); }