mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 06:31:20 +00:00
Check for valid author
This commit is contained in:
parent
883743e137
commit
cf413bd472
2 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ var Message = (function (_Equality) {
|
|||
|
||||
if (data.author instanceof _User2["default"]) {
|
||||
this.author = data.author;
|
||||
} else {
|
||||
} else if (data.author) {
|
||||
this.author = client.internal.users.add(new _User2["default"](data.author, client));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class Message extends Equality{
|
|||
|
||||
if(data.author instanceof User) {
|
||||
this.author = data.author;
|
||||
} else {
|
||||
} else if(data.author) {
|
||||
this.author = client.internal.users.add(new User(data.author, client));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue