mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +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) {
|
if (this.isPrivate) {
|
||||||
this.author = this.channel.client.getUser("id", author.id);
|
this.author = this.channel.client.getUser("id", author.id);
|
||||||
} else {
|
} 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;
|
this.attachments = data.attachments;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue