mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
make Message#member a getter
This commit is contained in:
parent
10f98d8e57
commit
d93d628f19
1 changed files with 9 additions and 7 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue