mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
refactor: remove lastMessage properties from User and GuildMember (#6046)
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user