mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 21:43:33 +01:00
fix(Role): throw TypeError in comparePositionTo (#3466)
This commit is contained in:
@@ -150,7 +150,7 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
comparePositionTo(role) {
|
comparePositionTo(role) {
|
||||||
role = this.guild.roles.resolve(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);
|
return this.constructor.comparePositions(this, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user