discord.js/src/stores/GuildStore.js
bdistin dd085ceaee Datastore cleanup (#1892)
* Start Store cleanup

* wip store cleanup

* fix iterables initiating datastores

* handle the possibility of a datastore with no holds and no its own 'create' method

* more cleanup (instances that need more than just client/data)

* missed RoleStore extras

* not sure how eslint didn't catch that tab...

* avoid re-getting the channel we already have...

* cleanup resolvers and refactor them into DataStores

* ^

* and remove

* fix some bugs

* fix lint

* fix documentation maybe?

* formatting

* fix presences

* really fix presences this time

* bad fix was bad... let;s see how bad this one is..

* forgot to save a file

* make presence resolving take userresolveables too

* fix tabs in jsdocs

* fix bad fix from last night that caused issues, with better fix...

* oops
2017-09-08 23:06:10 +02:00

38 lines
869 B
JavaScript

const DataStore = require('./DataStore');
const Guild = require('../structures/Guild');
/**
* Stores guilds.
* @private
* @extends {DataStore}
*/
class GuildStore extends DataStore {
constructor(client, iterable) {
super(client, iterable, Guild);
}
/**
* Data that resolves to give a Guild object. This can be:
* * A Guild object
* * A Snowflake
* @typedef {Guild|Snowflake} GuildResolvable
*/
/**
* Resolves a GuildResolvable to a Guild object.
* @method resolve
* @memberof GuildStore
* @param {GuildResolvable} guild The guild resolvable to identify
* @returns {?Guild}
*/
/**
* Resolves a GuildResolvable to a Guild ID string.
* @method resolveID
* @memberof GuildStore
* @param {GuildResolvable} guild The guild resolvable to identify
* @returns {?string}
*/
}
module.exports = GuildStore;