mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Merge branch 'indev-rewrite' of https://github.com/hydrabolt/discord.js into indev-rewrite
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user