mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
Fix other .equals(null) (#541)
This commit is contained in:
committed by
Amish Shah
parent
8038903c3e
commit
0a005cbd16
@@ -55,6 +55,7 @@ class GroupDMChannel extends Channel {
|
|||||||
|
|
||||||
equals(other) {
|
equals(other) {
|
||||||
const base = (
|
const base = (
|
||||||
|
other &&
|
||||||
this.id === other.id &&
|
this.id === other.id &&
|
||||||
this.name === other.name &&
|
this.name === other.name &&
|
||||||
this.icon === other.icon &&
|
this.icon === other.icon &&
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ class Guild {
|
|||||||
*/
|
*/
|
||||||
equals(data) {
|
equals(data) {
|
||||||
let base =
|
let base =
|
||||||
|
data &&
|
||||||
this.id === data.id &&
|
this.id === data.id &&
|
||||||
this.available === !data.unavailable &&
|
this.available === !data.unavailable &&
|
||||||
this.splash === data.splash &&
|
this.splash === data.splash &&
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class GuildChannel extends Channel {
|
|||||||
*/
|
*/
|
||||||
equals(other) {
|
equals(other) {
|
||||||
let base = (
|
let base = (
|
||||||
|
other &&
|
||||||
this.type === other.type &&
|
this.type === other.type &&
|
||||||
this.topic === other.topic &&
|
this.topic === other.topic &&
|
||||||
this.position === other.position &&
|
this.position === other.position &&
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class Role {
|
|||||||
|
|
||||||
equals(role) {
|
equals(role) {
|
||||||
return (
|
return (
|
||||||
|
role &&
|
||||||
this.id === role.id &&
|
this.id === role.id &&
|
||||||
this.name === role.name &&
|
this.name === role.name &&
|
||||||
this.color === role.color &&
|
this.color === role.color &&
|
||||||
|
|||||||
Reference in New Issue
Block a user