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:
SpaceEEC
2019-06-05 22:18:06 +02:00
parent 8e1857286d
commit 4a2335c69c
3 changed files with 68 additions and 69 deletions

View File

@@ -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;