mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
Add client.cacheUser method (#548)
* Add client.cacheUser method * Fixed ESLint issues * Added existence check first
This commit is contained in:
committed by
Amish Shah
parent
e47f3dda94
commit
f944dce5c7
15
src/client/actions/UserGet.js
Normal file
15
src/client/actions/UserGet.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const Action = require('./Action');
|
||||
|
||||
class UserGetAction extends Action {
|
||||
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
const user = client.dataManager.newUser(data);
|
||||
|
||||
return {
|
||||
user,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UserGetAction;
|
||||
Reference in New Issue
Block a user