mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
removed ES6 function calls
This commit is contained in:
@@ -159,9 +159,14 @@ export default class Resolver {
|
||||
}
|
||||
if (resource instanceof User) {
|
||||
// see if a PM exists
|
||||
var chatFound = this.internal.private_channels.find(
|
||||
pmchat => pmchat.recipient.equals(resource)
|
||||
);
|
||||
var chatFound = false;
|
||||
for (var pmchat of this.internal.private_channels) {
|
||||
if (pmchat.recipient.equals(resource)) {
|
||||
chatFound = pmchat;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (chatFound) {
|
||||
// a PM already exists!
|
||||
return Promise.resolve(chatFound);
|
||||
|
||||
Reference in New Issue
Block a user