Webpack build for branch master: 9a5de25d79

This commit is contained in:
Travis CI 2017-04-30 02:52:02 +00:00
parent e88f1d00ff
commit 9b7b9f5f67
2 changed files with 54 additions and 1 deletions

View file

@ -5090,6 +5090,59 @@ class Emoji {
return this.client.rest.methods.updateEmoji(this, data);
}
/**
* Set the name of the emoji.
* @param {string} name The new name for the emoji
* @returns {Promise<Emoji>}
*/
setName(name) {
return this.edit({ name });
}
/**
* Add a role to the list of roles that can use this emoji.
* @param {Role} role The role to add
* @returns {Promise<Emoji>}
*/
addRestrictedRole(role) {
return this.addRestrictedRoles([role]);
}
/**
* Add multiple roles to the list of roles that can use this emoji.
* @param {Role[]} roles Roles to add
* @returns {Promise<Emoji>}
*/
addRestrictedRoles(roles) {
const newRoles = new Collection(this.roles);
for (const role of roles) {
if (this.guild.roles.has(role.id)) newRoles.set(role.id, role);
}
return this.edit({ roles: newRoles });
}
/**
* Remove a role from the list of roles that can use this emoji.
* @param {Role} role The role to remove
* @returns {Promise<Emoji>}
*/
removeRestrictedRole(role) {
return this.removeRestrictedRoles([role]);
}
/**
* Remove multiple roles from the list of roles that can use this emoji.
* @param {Role[]} roles Roles to remove
* @returns {Promise<Emoji>}
*/
removeRestrictedRoles(roles) {
const newRoles = new Collection(this.roles);
for (const role of roles) {
if (newRoles.has(role.id)) newRoles.delete(role.id);
}
return this.edit({ roles: newRoles });
}
/**
* When concatenated with a string, this automatically returns the emoji mention rather than the object.
* @returns {string}

File diff suppressed because one or more lines are too long