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

@@ -78,25 +78,6 @@ class ChannelStore extends DataStore {
super.remove(id);
}
/**
* Obtains a channel from Discord, or the channel cache if it's already available.
* @param {Snowflake} id ID of the channel
* @param {boolean} [cache=true] Whether to cache the new channel object if it isn't already
* @returns {Promise<Channel>}
* @example
* // Fetch a channel by its id
* client.channels.fetch('222109930545610754')
* .then(channel => console.log(channel.name))
* .catch(console.error);
*/
async fetch(id, cache = true) {
const existing = this.get(id);
if (existing && !existing.partial) return existing;
const data = await this.client.api.channels(id).get();
return this.add(data, null, cache);
}
/**
* Data that can be resolved to give a Channel object. This can be:
* * A Channel object
@@ -121,6 +102,25 @@ class ChannelStore extends DataStore {
* @param {ChannelResolvable} channel The channel resolvable to resolve
* @returns {?Snowflake}
*/
/**
* Obtains a channel from Discord, or the channel cache if it's already available.
* @param {Snowflake} id ID of the channel
* @param {boolean} [cache=true] Whether to cache the new channel object if it isn't already
* @returns {Promise<Channel>}
* @example
* // Fetch a channel by its id
* client.channels.fetch('222109930545610754')
* .then(channel => console.log(channel.name))
* .catch(console.error);
*/
async fetch(id, cache = true) {
const existing = this.get(id);
if (existing && !existing.partial) return existing;
const data = await this.client.api.channels(id).get();
return this.add(data, null, cache);
}
}
module.exports = ChannelStore;