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

@@ -29,6 +29,12 @@ class DMChannel extends Channel {
* @type {?Snowflake}
*/
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;
}
/**
@@ -42,6 +48,7 @@ class DMChannel extends Channel {
// These are here only for documentation purposes - they are implemented by TextBasedChannel
/* eslint-disable no-empty-function */
get lastPinAt() {}
send() {}
sendMessage() {}
sendEmbed() {}