mirror of
https://github.com/danbulant/discord.js
synced 2026-05-30 04:41:11 +00:00
backport: User#dmChannel perf enhancement (#2780)
This commit is contained in:
parent
7684ad3ca6
commit
911e289b55
1 changed files with 1 additions and 1 deletions
|
|
@ -188,7 +188,7 @@ class User {
|
|||
* @readonly
|
||||
*/
|
||||
get dmChannel() {
|
||||
return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id);
|
||||
return this.client.channels.find(c => c.type === 'dm' && c.recipient.id === this.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue