mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
docs(*Resolvable): make them appear on the docs
I don't know what part of the docgen is not working properly, but this seems to fix those typedef to not appear on the documentation
This commit is contained in:
@@ -82,31 +82,6 @@ class MessageStore extends DataStore {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a message, even if it's not cached.
|
||||
* @param {MessageResolvable} message The message to delete
|
||||
* @param {string} [reason] Reason for deleting this message, if it does not belong to the client user
|
||||
*/
|
||||
async remove(message, reason) {
|
||||
message = this.resolveID(message);
|
||||
if (message) await this.client.api.channels(this.channel.id).messages(message).delete({ reason });
|
||||
}
|
||||
|
||||
async _fetchId(messageID, cache) {
|
||||
const existing = this.get(messageID);
|
||||
if (existing && !existing.partial) return existing;
|
||||
const data = await this.client.api.channels[this.channel.id].messages[messageID].get();
|
||||
return this.add(data, cache);
|
||||
}
|
||||
|
||||
async _fetchMany(options = {}, cache) {
|
||||
const data = await this.client.api.channels[this.channel.id].messages.get({ query: options });
|
||||
const messages = new Collection();
|
||||
for (const message of data) messages.set(message.id, this.add(message, cache));
|
||||
return messages;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Data that can be resolved to a Message object. This can be:
|
||||
* * A Message
|
||||
@@ -131,6 +106,30 @@ class MessageStore extends DataStore {
|
||||
* @param {MessageResolvable} message The message resolvable to resolve
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Deletes a message, even if it's not cached.
|
||||
* @param {MessageResolvable} message The message to delete
|
||||
* @param {string} [reason] Reason for deleting this message, if it does not belong to the client user
|
||||
*/
|
||||
async remove(message, reason) {
|
||||
message = this.resolveID(message);
|
||||
if (message) await this.client.api.channels(this.channel.id).messages(message).delete({ reason });
|
||||
}
|
||||
|
||||
async _fetchId(messageID, cache) {
|
||||
const existing = this.get(messageID);
|
||||
if (existing && !existing.partial) return existing;
|
||||
const data = await this.client.api.channels[this.channel.id].messages[messageID].get();
|
||||
return this.add(data, cache);
|
||||
}
|
||||
|
||||
async _fetchMany(options = {}, cache) {
|
||||
const data = await this.client.api.channels[this.channel.id].messages.get({ query: options });
|
||||
const messages = new Collection();
|
||||
for (const message of data) messages.set(message.id, this.add(message, cache));
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageStore;
|
||||
|
||||
Reference in New Issue
Block a user