mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-03 01:20:07 +00:00
fix(TextBasedChannel): added missing lastMessage functionality in textchannels (#2999)
This commit is contained in:
@@ -395,6 +395,15 @@ class TextBasedChannel {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* The date when the last pinned message was pinned, if there was one
|
||||
* @type {?Date}
|
||||
@@ -599,6 +608,7 @@ exports.applyToClass = (structure, full = false, ignore = []) => {
|
||||
'fetchMessages',
|
||||
'fetchMessage',
|
||||
'search',
|
||||
'lastMessage',
|
||||
'lastPinAt',
|
||||
'bulkDelete',
|
||||
'startTyping',
|
||||
|
||||
Reference in New Issue
Block a user