mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
fix(Role): throw TypeError in comparePositionTo (#3466)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user