From e7eab427e59b76a3dc1474acac8ac33376ca06f8 Mon Sep 17 00:00:00 2001 From: reeeeeeeeeeeeeeeeeeeeeeeeeeeeeee <37480488+reeeeeeeeeeeeeeeeeeeeeeeeeeeeeee@users.noreply.github.com> Date: Sat, 16 Jun 2018 21:10:24 +0100 Subject: [PATCH] docs: document lastMessageID for TextChannel and (Group)DMChannel (#2602) * Adds JSDocs for TextChannel.lastMessageID * oops * docs: document lastMessageID in (Group)DMChannel as well --- src/structures/DMChannel.js | 4 ++++ src/structures/GroupDMChannel.js | 4 ++++ src/structures/TextChannel.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js index bbf744d22..5c784b3a3 100644 --- a/src/structures/DMChannel.js +++ b/src/structures/DMChannel.js @@ -27,6 +27,10 @@ class DMChannel extends Channel { */ this.recipient = this.client.users.add(data.recipients[0]); + /** + * The ID of the last message in the channel, if one was sent + * @type {?Snowflake} + */ this.lastMessageID = data.last_message_id; } diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index 21ab142ea..14ceeae5d 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -98,6 +98,10 @@ class GroupDMChannel extends Channel { } } + /** + * The ID of the last message in the channel, if one was sent + * @type {?Snowflake} + */ this.lastMessageID = data.last_message_id; } diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index a806b87ee..df734a748 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -37,6 +37,10 @@ class TextChannel extends GuildChannel { */ this.nsfw = data.nsfw || /^nsfw(-|$)/.test(this.name); + /** + * The ID of the last message sent in this channel, if one was sent + * @type {?Snowflake} + */ this.lastMessageID = data.last_message_id; if (data.messages) for (const message of data.messages) this.messages.add(message);