mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Equals updates (#987)
* Docs update
Changed the param names and param descriptions to be consistent.
* Added === comparison
Changed Presence.equals and Game.equals to first compare using ===
* Collection.equals fix
Now returns false when collection is undefined, instead of crashing
💯
This commit is contained in:
committed by
Schuyler Cebulskie
parent
906bb3c5f3
commit
264ee8e7f1
@@ -302,7 +302,7 @@ class Role {
|
||||
* Whether this role equals another role. It compares all properties, so for most operations
|
||||
* it is advisable to just compare `role.id === role2.id` as it is much faster and is often
|
||||
* what most users need.
|
||||
* @param {Role} role The role to compare to
|
||||
* @param {Role} role Role to compare with
|
||||
* @returns {boolean}
|
||||
*/
|
||||
equals(role) {
|
||||
|
||||
Reference in New Issue
Block a user