backport(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2870)

And clarify Client#channelPinsUpdate's 'time' parameter.
This commit is contained in:
SpaceEEC
2018-10-10 10:01:04 +02:00
committed by GitHub
parent fcf4745a43
commit ea3e575546
6 changed files with 47 additions and 2 deletions

View File

@@ -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() { }