mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Remove double iteration (#2773)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user