mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Updated message class
Will now crash less when handling masses of data from hundreds of server, as sometimes when a server is destroyed the message still believes it exists
This commit is contained in:
parent
9aff24201f
commit
0b2778c114
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class Message {
|
|||
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.author = this.channel.server ? this.channel.server.getMember("id", author.id) : this.channel.client.getUser("id", author.id);
|
||||
}
|
||||
|
||||
this.attachments = data.attachments;
|
||||
|
|
|
|||
Loading…
Reference in a new issue