mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 19:20:42 +00:00
Rename client.cacheUser to client.fetchUser (#551)
This commit is contained in:
parent
135ab02104
commit
7ae12ab325
1 changed files with 3 additions and 3 deletions
|
|
@ -136,11 +136,11 @@ class Client extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forces a user to be cached.
|
* Caches a user, or obtains it from the cache if it's already cached
|
||||||
* @param {String} id The ID of the user to cache
|
* @param {String} id The ID of the user to obtain
|
||||||
* @return {Promise<User>}
|
* @return {Promise<User>}
|
||||||
*/
|
*/
|
||||||
cacheUser(id) {
|
fetchUser(id) {
|
||||||
if (this.users.has(id)) return Promise.resolve(this.users.get(id));
|
if (this.users.has(id)) return Promise.resolve(this.users.get(id));
|
||||||
return this.rest.methods.getUser(id);
|
return this.rest.methods.getUser(id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue