mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
fix: correctly access guild IDs inside managers (#6927)
This commit is contained in:
@@ -210,9 +210,9 @@ class GuildChannelManager extends CachedManager {
|
|||||||
parent_id: typeof r.parent !== 'undefined' ? this.channels.resolveId(r.parent) : undefined,
|
parent_id: typeof r.parent !== 'undefined' ? this.channels.resolveId(r.parent) : undefined,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await this.client.api.guilds(this.id).channels.patch({ data: channelPositions });
|
await this.client.api.guilds(this.guild.id).channels.patch({ data: channelPositions });
|
||||||
return this.client.actions.GuildChannelsPositionUpdate.handle({
|
return this.client.actions.GuildChannelsPositionUpdate.handle({
|
||||||
guild_id: this.id,
|
guild_id: this.guild.id,
|
||||||
channels: channelPositions,
|
channels: channelPositions,
|
||||||
}).guild;
|
}).guild;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,11 +235,11 @@ class RoleManager extends CachedManager {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Call the API to update role positions
|
// Call the API to update role positions
|
||||||
await this.client.api.guilds(this.id).roles.patch({
|
await this.client.api.guilds(this.guild.id).roles.patch({
|
||||||
data: rolePositions,
|
data: rolePositions,
|
||||||
});
|
});
|
||||||
return this.client.actions.GuildRolesPositionUpdate.handle({
|
return this.client.actions.GuildRolesPositionUpdate.handle({
|
||||||
guild_id: this.id,
|
guild_id: this.guild.id,
|
||||||
roles: rolePositions,
|
roles: rolePositions,
|
||||||
}).guild;
|
}).guild;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user