More shortcuts

This commit is contained in:
abalabahaha
2015-12-05 09:43:11 -08:00
parent ae71087bcc
commit 559ed5f76f
11 changed files with 91 additions and 86 deletions

View File

@@ -131,32 +131,32 @@ export default class Role {
}
return "#"+val;
}
delete() {
return this.client.deleteRole.apply(this.client, reg(this, arguments));
}
edit() {
return this.client.updateRole.apply(this.client, reg(this, arguments));
}
update() {
return this.client.updateRole.apply(this.client, reg(this, arguments));
}
addMember(member, callback) {
return this.client.addMemberToRole.apply(this.client, [member, this, callback]);
}
addUser(member, callback) {
return this.client.addMemberToRole.apply(this.client, [member, this, callback]);
return this.client.addUserToRole.apply(this.client, [member, this, callback]);
}
removeMember(member, callback) {
return this.client.removeMemberFromRole.apply(this.client, [member, this, callback]);
}
removeUser(member, callback) {
return this.client.removeMemberFromRole.apply(this.client, [member, this, callback]);
return this.client.removeUserFromRole.apply(this.client, [member, this, callback]);
}
}