mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user