Merge branch 'master' into indev-prism

This commit is contained in:
Amish Shah
2017-01-15 14:20:32 +00:00
8 changed files with 82 additions and 20 deletions

View File

@@ -287,11 +287,12 @@ class Client extends EventEmitter {
* Caches a user, or obtains it from the cache if it's already cached.
* <warn>This is only available when using a bot account.</warn>
* @param {string} id The ID of the user to obtain
* @param {boolean} [cache=true] Insert the user into the users cache
* @returns {Promise<User>}
*/
fetchUser(id) {
fetchUser(id, cache = true) {
if (this.users.has(id)) return Promise.resolve(this.users.get(id));
return this.rest.methods.getUser(id);
return this.rest.methods.getUser(id, cache);
}
/**