mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +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
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get dmChannel() {
|
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