Added shortcuts to user and server classes

User.addTo User.removeFrom Server.leave/delete Server.createInvite Server.createRole
This commit is contained in:
Amish Shah
2015-12-05 17:03:05 +00:00
parent 5a971ba097
commit 780565ff68
4 changed files with 51 additions and 0 deletions

View File

@@ -70,6 +70,14 @@ var User = (function (_Equality) {
return this.client.sendTTSMessage.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
};
User.prototype.addTo = function addTo(role, callback) {
return this.client.addMemberToRole.apply(this.client, [this, role, callback]);
};
User.prototype.removeFrom = function removeFrom(role, callback) {
return this.client.removeMemberFromRole.apply(this.client, [this, role, callback]);
};
_createClass(User, [{
key: "avatarURL",
get: function get() {