mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Check for valid author
This commit is contained in:
@@ -56,7 +56,7 @@ var Message = (function (_Equality) {
|
|||||||
|
|
||||||
if (data.author instanceof _User2["default"]) {
|
if (data.author instanceof _User2["default"]) {
|
||||||
this.author = data.author;
|
this.author = data.author;
|
||||||
} else {
|
} else if (data.author) {
|
||||||
this.author = client.internal.users.add(new _User2["default"](data.author, client));
|
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) {
|
if(data.author instanceof User) {
|
||||||
this.author = data.author;
|
this.author = data.author;
|
||||||
} else {
|
} else if(data.author) {
|
||||||
this.author = client.internal.users.add(new User(data.author, client));
|
this.author = client.internal.users.add(new User(data.author, client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user