mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
20 lines
605 B
ReStructuredText
20 lines
605 B
ReStructuredText
.. include:: ./vars.rst
|
|
|
|
Equality
|
|
========
|
|
|
|
The Equality class is used to see if two objects are equal, based on ``object_1.id === object_2.id``.
|
|
|
|
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.
|
|
|
|
Functions
|
|
---------
|
|
|
|
--------
|
|
|
|
equals(object)
|
|
~~~~~~~~~~~~~~
|
|
|
|
Returns true if the specified object is the same as this one.
|
|
|
|
- **object** - Any `object` with an ``id`` property. |