Skip to content

Commit

Permalink
fix(Message): fix message with snapshot construction in known guild (#…
Browse files Browse the repository at this point in the history
…188)

Got this error a bunch during deployment... Seems to be because during
the message.channel.guild check it doesn't account for null authors.
  • Loading branch information
Snazzah authored Nov 25, 2024
1 parent 23aff37 commit ac892d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Message extends Base {
* @type {Member?}
*/
this.member = this.channel.guild.members.update(data.member, this.channel.guild);
} else if(this.channel.guild.members.has(this.author.id)) {
} else if(this.author && this.channel.guild.members.has(this.author.id)) {
this.member = this.channel.guild.members.get(this.author.id);
} else {
this.member = null;
Expand Down

0 comments on commit ac892d9

Please sign in to comment.