mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix: Convert lastMessage to getters (#2384)
* convert lastMessage to getters * fix bug in pr * requested changes
This commit is contained in:
@@ -21,12 +21,15 @@ class TextBasedChannel {
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.lastMessageID = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Message object of the last message in the channel, if one was sent
|
||||
* @type {?Message}
|
||||
*/
|
||||
this.lastMessage = null;
|
||||
/**
|
||||
* The Message object of the last message in the channel, if one was sent
|
||||
* @type {?Message}
|
||||
* @readonly
|
||||
*/
|
||||
get lastMessage() {
|
||||
return this.messages.get(this.lastMessageID) || null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -334,6 +337,7 @@ class TextBasedChannel {
|
||||
if (full) {
|
||||
props.push(
|
||||
'acknowledge',
|
||||
'lastMessage',
|
||||
'search',
|
||||
'bulkDelete',
|
||||
'startTyping',
|
||||
|
||||
Reference in New Issue
Block a user