mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Fixed PM Channel bug, 3.8.2
Clients no longer crashed when receiving PM channel messages.
This commit is contained in:
@@ -12,7 +12,13 @@ class Message{
|
||||
this.editedTimestamp = data.edited_timestamp;
|
||||
this.content = data.content.trim();
|
||||
this.channel = channel;
|
||||
this.author = this.channel.server.getMember("id", author.id);
|
||||
|
||||
if(this.isPrivate){
|
||||
this.author = this.channel.client.getUser("id", author.id);
|
||||
}else{
|
||||
this.author = this.channel.server.getMember("id", author.id) || this.channel.client.getUser("id", author.id);
|
||||
}
|
||||
|
||||
this.attachments = data.attachments;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user