feat(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2813)

* add lastPinTimestamp

* typings

* use or instead of ternary
This commit is contained in:
Ash
2018-09-03 03:11:52 -04:00
committed by SpaceEEC
parent b068abb5de
commit e96a60361a
6 changed files with 45 additions and 1 deletions

View File

@@ -103,6 +103,12 @@ class GroupDMChannel 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;
}
/**
@@ -219,6 +225,7 @@ class GroupDMChannel extends Channel {
// These are here only for documentation purposes - they are implemented by TextBasedChannel
/* eslint-disable no-empty-function */
get lastMessage() {}
get lastPinAt() {}
send() {}
search() {}
startTyping() {}