[+] Expose information about the logged in client (#19)
This commit is contained in:
parent
88c56b1371
commit
ba8edc8d40
1 changed files with 46 additions and 3 deletions
27
src/structures/ClientInfo.js
Normal file
27
src/structures/ClientInfo.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
|
||||
/**
|
||||
* Current connection information
|
||||
* @extends {Base}
|
||||
*/
|
||||
class ClientInfo extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
this.pushname = data.pushname;
|
||||
this.me = data.me;
|
||||
this.phone = data.phone;
|
||||
this.platform = data.platform;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ClientInfo;
|
||||
Loading…
Reference in a new issue