mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
fix(Guild): resolve role id and call existing handler (#3904)
This commit is contained in:
@@ -1169,7 +1169,7 @@ class Guild extends Base {
|
|||||||
setRolePositions(rolePositions) {
|
setRolePositions(rolePositions) {
|
||||||
// Make sure rolePositions are prepared for API
|
// Make sure rolePositions are prepared for API
|
||||||
rolePositions = rolePositions.map(o => ({
|
rolePositions = rolePositions.map(o => ({
|
||||||
id: o.role,
|
id: this.roles.resolveID(o.role),
|
||||||
position: o.position,
|
position: o.position,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -1181,7 +1181,7 @@ class Guild extends Base {
|
|||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
() =>
|
() =>
|
||||||
this.client.actions.GuildRolePositionUpdate.handle({
|
this.client.actions.GuildRolesPositionUpdate.handle({
|
||||||
guild_id: this.id,
|
guild_id: this.id,
|
||||||
roles: rolePositions,
|
roles: rolePositions,
|
||||||
}).guild,
|
}).guild,
|
||||||
|
|||||||
Reference in New Issue
Block a user