mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 00:20:07 +00:00
backport(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2870)
And clarify Client#channelPinsUpdate's 'time' parameter.
This commit is contained in:
@@ -37,6 +37,12 @@ class TextChannel extends GuildChannel {
|
||||
*/
|
||||
this.lastMessageID = data.last_message_id;
|
||||
|
||||
/**
|
||||
* The timestamp when the last pinned message was pinned, if there was one
|
||||
* @type {?number}
|
||||
*/
|
||||
this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null;
|
||||
|
||||
/**
|
||||
* The ratelimit per user for this channel
|
||||
* @type {number}
|
||||
@@ -115,6 +121,7 @@ class TextChannel extends GuildChannel {
|
||||
|
||||
// These are here only for documentation purposes - they are implemented by TextBasedChannel
|
||||
/* eslint-disable no-empty-function */
|
||||
get lastPinAt() {}
|
||||
send() { }
|
||||
sendMessage() { }
|
||||
sendEmbed() { }
|
||||
|
||||
Reference in New Issue
Block a user