mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build: 57af84bc95
This commit is contained in:
parent
dc32f46d71
commit
bd27ee3722
2 changed files with 4 additions and 6 deletions
|
|
@ -5974,15 +5974,13 @@ class Guild {
|
|||
if (role instanceof Role) {
|
||||
role = role.id;
|
||||
} else if (typeof role !== 'string') {
|
||||
return Promise.reject(new Error('Supplied role is not a role or string'));
|
||||
return Promise.reject(new Error('Supplied role is not a role or string.'));
|
||||
}
|
||||
|
||||
position = Number(position);
|
||||
if (isNaN(position)) {
|
||||
return Promise.reject(new Error('Supplied position is not a number'));
|
||||
}
|
||||
if (isNaN(position)) return Promise.reject(new Error('Supplied position is not a number.'));
|
||||
|
||||
const updatedRoles = this.roles.array().map(r => ({
|
||||
const updatedRoles = this.roles.map(r => ({
|
||||
id: r.id,
|
||||
position: r.id === role ? position : r.position < position ? r.position : r.position + 1,
|
||||
}));
|
||||
|
|
|
|||
2
discord.indev.min.js
vendored
2
discord.indev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue