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