refactor: remove lastMessage properties from User and GuildMember (#6046)

This commit is contained in:
Antonio Román
2021-07-05 14:11:13 +02:00
committed by GitHub
parent 676118ab0f
commit 1a27f57950
5 changed files with 34 additions and 62 deletions

View File

@@ -32,18 +32,6 @@ class User extends Base {
this.flags = null;
/**
* The user's last message id, if one was sent
* @type {?Snowflake}
*/
this.lastMessageId = null;
/**
* The channel in which the last message was sent by the user, if one was sent
* @type {?Snowflake}
*/
this.lastMessageChannelId = null;
this._patch(data);
}
@@ -134,15 +122,6 @@ class User extends Base {
return new Date(this.createdTimestamp);
}
/**
* The Message object of the last message sent by the user, if one was sent
* @type {?Message}
* @readonly
*/
get lastMessage() {
return this.client.channels.resolve(this.lastMessageChannelId)?.messages.resolve(this.lastMessageId) ?? null;
}
/**
* The presence of this user
* @type {Presence}
@@ -316,8 +295,6 @@ class User extends Base {
createdTimestamp: true,
defaultAvatarURL: true,
tag: true,
lastMessage: false,
lastMessageId: false,
},
...props,
);