Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly access guild IDs inside managers #6927

Merged
merged 1 commit into from Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/managers/GuildChannelManager.js
Expand Up @@ -210,9 +210,9 @@ class GuildChannelManager extends CachedManager {
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({
guild_id: this.id,
guild_id: this.guild.id,
channels: channelPositions,
}).guild;
}
Expand Down
4 changes: 2 additions & 2 deletions src/managers/RoleManager.js
Expand Up @@ -235,11 +235,11 @@ class RoleManager extends CachedManager {
}));

// 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,
});
return this.client.actions.GuildRolesPositionUpdate.handle({
guild_id: this.id,
guild_id: this.guild.id,
roles: rolePositions,
}).guild;
}
Expand Down