mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Utilise Collection#equals for structures' equals (#986)
Utilizing Collection.equals in GuildChannel.equals Utilizing Collection.equals in GroupDMChannel.equals
This commit is contained in:
committed by
Schuyler Cebulskie
parent
bef0523ebf
commit
906bb3c5f3
@@ -1,7 +1,6 @@
|
||||
const Channel = require('./Channel');
|
||||
const TextBasedChannel = require('./interface/TextBasedChannel');
|
||||
const Collection = require('../util/Collection');
|
||||
const arraysEqual = require('../util/ArraysEqual');
|
||||
|
||||
/*
|
||||
{ type: 3,
|
||||
@@ -101,9 +100,7 @@ class GroupDMChannel extends Channel {
|
||||
this.ownerID === channel.ownerID;
|
||||
|
||||
if (equal) {
|
||||
const thisIDs = this.recipients.keyArray();
|
||||
const otherIDs = channel.recipients.keyArray();
|
||||
return arraysEqual(thisIDs, otherIDs);
|
||||
return this.recipients.equals(channel.recipients);
|
||||
}
|
||||
|
||||
return equal;
|
||||
|
||||
Reference in New Issue
Block a user