Reorganised a bunch of methods

This commit is contained in:
Schuyler Cebulskie
2016-09-11 23:55:50 -04:00
parent ce6cb626dc
commit 95de09f389
7 changed files with 169 additions and 175 deletions

View File

@@ -23,6 +23,10 @@ class ClientUser extends User {
this._typing = new Map();
}
edit(data) {
return this.client.rest.methods.updateCurrentUser(data);
}
/**
* Set the username of the logged in Client.
* <info>Changing usernames in Discord is heavily rate limited, with only 2 requests
@@ -96,7 +100,7 @@ class ClientUser extends User {
* .then(user => console.log('Changed status!'))
* .catch(console.log);
*/
setStatus(status, game, url = null) {
setStatus(status, game = null, url = null) {
return new Promise(resolve => {
if (status === 'online' || status === 'here' || status === 'available') {
this.idleStatus = null;
@@ -136,10 +140,6 @@ class ClientUser extends User {
resolve(this);
});
}
edit(data) {
return this.client.rest.methods.updateCurrentUser(data);
}
}
module.exports = ClientUser;