Skip to content

Commit

Permalink
Pass user data with member in Message constructor (abalabahaha#1260)
Browse files Browse the repository at this point in the history
Prevents "User associated with Member not found"
  • Loading branch information
retraigo committed Aug 19, 2021
1 parent a58cd69 commit 6331536
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ class Message extends Base {
if(this.channel.guild) {
if(data.member) {
data.member.id = this.author.id;
if(data.author) {
data.member.user = data.author;
}
this.member = this.channel.guild.members.update(data.member, this.channel.guild);
} else if(this.channel.guild.members.has(this.author.id)) {
this.member = this.channel.guild.members.get(this.author.id);
Expand Down

0 comments on commit 6331536

Please sign in to comment.