mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 19:50:55 +00:00
Webpack build for branch master: 048e147497
This commit is contained in:
parent
1dd23b8894
commit
9be9dd982f
2 changed files with 8 additions and 6 deletions
|
|
@ -10306,8 +10306,9 @@ class RoleStore extends DataStore {
|
||||||
/**
|
/**
|
||||||
* Creates a new role in the guild with given information.
|
* Creates a new role in the guild with given information.
|
||||||
* <warn>The position will silently reset to 1 if an invalid one is provided, or none.</warn>
|
* <warn>The position will silently reset to 1 if an invalid one is provided, or none.</warn>
|
||||||
* @param {RoleData} [data] The data to update the role with
|
* @param {Object} [options] Options
|
||||||
* @param {string} [reason] Reason for creating this role
|
* @param {RoleData} [options.data] The data to update the role with
|
||||||
|
* @param {string} [options.reason] Reason for creating this role
|
||||||
* @returns {Promise<Role>}
|
* @returns {Promise<Role>}
|
||||||
* @example
|
* @example
|
||||||
* // Create a new role
|
* // Create a new role
|
||||||
|
|
@ -10317,15 +10318,16 @@ class RoleStore extends DataStore {
|
||||||
* @example
|
* @example
|
||||||
* // Create a new role with data and a reason
|
* // Create a new role with data and a reason
|
||||||
* guild.roles.create({
|
* guild.roles.create({
|
||||||
|
* data: {
|
||||||
* name: 'Super Cool People',
|
* name: 'Super Cool People',
|
||||||
* color: 'BLUE'
|
* color: 'BLUE',
|
||||||
* },
|
* },
|
||||||
* 'we needed a role for Super Cool People',
|
* reason: 'we needed a role for Super Cool People',
|
||||||
* })
|
* })
|
||||||
* .then(console.log)
|
* .then(console.log)
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
create(data = {}, reason) {
|
create({ data = {}, reason } = {}) {
|
||||||
if (data.color) data.color = resolveColor(data.color);
|
if (data.color) data.color = resolveColor(data.color);
|
||||||
if (data.permissions) data.permissions = Permissions.resolve(data.permissions);
|
if (data.permissions) data.permissions = Permissions.resolve(data.permissions);
|
||||||
|
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue