Skip to content

Commit

Permalink
refactor: destructure more!
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Dec 25, 2022
1 parent 04e2f30 commit c5d28fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/discord.js/src/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,11 @@ class Guild extends AnonymousGuild {
reason,
}) {
const {
client: { channels, users },
client: { actions, channels, rest, users },
id,
} = this;

const newData = await this.client.rest.patch(Routes.guild(this.id), {
const newData = await rest.patch(Routes.guild(id), {
body: {
name,
verification_level: verificationLevel,
Expand All @@ -838,7 +839,7 @@ class Guild extends AnonymousGuild {
reason,
});

return this.client.actions.GuildUpdate.handle(newData).updated;
return actions.GuildUpdate.handle(newData).updated;
}

/**
Expand Down

0 comments on commit c5d28fb

Please sign in to comment.