mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Add message/channel/guild acknowledging (#1239)
* add acking
* 👀
* Update RESTMethods.js
* Update TextBasedChannel.js
* Update RESTMethods.js
* Update Guild.js
* Update TextBasedChannel.js
* Update Message.js
* super shitty names
* Update GroupDMChannel.js
* Update DMChannel.js
* Update TextChannel.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
fa609caee2
commit
94062d19dd
@@ -423,6 +423,15 @@ class TextBasedChannel {
|
||||
throw new TypeError('The messages must be an Array, Collection, or number.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks all messages in this channel as read
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
* @returns {Promise<TextChannel|GroupDMChannel|DMChannel>}
|
||||
*/
|
||||
acknowledge() {
|
||||
return this.client.rest.methods.ackTextMessage(this);
|
||||
}
|
||||
|
||||
_cacheMessage(message) {
|
||||
const maxSize = this.client.options.messageCacheMaxSize;
|
||||
if (maxSize === 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user