mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
5.0.1 & docs
This commit is contained in:
@@ -7,6 +7,12 @@ The Equality class is used to see if two objects are equal, based on ``object_1.
|
||||
|
||||
If any class in Discord extends equality, it means you should never the default equality operands (``==`` & ``===``) as they could potentially be different instances and therefore appear not to be equal. Instead, use ``equalityObject.equals()`` as shown below.
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
object1.equals(object2); // GOOD ✓
|
||||
|
||||
object1 == object2; // BAD ✖
|
||||
|
||||
--------
|
||||
|
||||
Functions
|
||||
|
||||
Reference in New Issue
Block a user