mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
docs: document lastMessageID for TextChannel and (Group)DMChannel (#2602)
* Adds JSDocs for TextChannel.lastMessageID * oops * docs: document lastMessageID in (Group)DMChannel as well
This commit is contained in:
parent
037e8cf969
commit
e7eab427e5
3 changed files with 12 additions and 0 deletions
|
|
@ -27,6 +27,10 @@ class DMChannel extends Channel {
|
||||||
*/
|
*/
|
||||||
this.recipient = this.client.users.add(data.recipients[0]);
|
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;
|
this.lastMessageID = data.last_message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
this.lastMessageID = data.last_message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ class TextChannel extends GuildChannel {
|
||||||
*/
|
*/
|
||||||
this.nsfw = data.nsfw || /^nsfw(-|$)/.test(this.name);
|
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;
|
this.lastMessageID = data.last_message_id;
|
||||||
|
|
||||||
if (data.messages) for (const message of data.messages) this.messages.add(message);
|
if (data.messages) for (const message of data.messages) this.messages.add(message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue