mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Remove double iteration (#2773)
This commit is contained in:
parent
68c832957d
commit
4a24e8c12c
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ class User extends Base {
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get dmChannel() {
|
get dmChannel() {
|
||||||
return this.client.channels.filter(c => c.type === 'dm').find(c => c.recipient.id === this.id) || null;
|
return this.client.channels.find(c => c.type === 'dm' && c.recipient.id === this.id) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue