make Message#member a getter

This commit is contained in:
Lewdcario
2018-01-27 17:04:03 -06:00
parent 10f98d8e57
commit d93d628f19

View File

@@ -54,13 +54,6 @@ class Message extends Base {
*/
this.author = this.client.users.add(data.author, !data.webhook_id);
/**
* Represents the author of the message as a guild member.
* Only available if the message comes from a guild where the author is still a member
* @type {?GuildMember}
*/
this.member = this.guild ? this.guild.member(this.author) || null : null;
/**
* Whether or not this message is pinned
* @type {boolean}
@@ -201,6 +194,15 @@ class Message extends Base {
);
}
/**
* Represents the author of the message as a guild member.
* Only available if the message comes from a guild where the author is still a member
* @type {?GuildMember}
*/
get member() {
return this.guild ? this.guild.member(this.author) || null : null;
}
/**
* The time the message was sent at
* @type {Date}