From 8411b9e14211f83fddb00f622088979ee6586803 Mon Sep 17 00:00:00 2001 From: BannerBomb Date: Sun, 28 Mar 2021 09:23:32 -0400 Subject: [PATCH] fix(Guild/GuildChannel): methods reason arg usage (#5419) --- src/structures/Guild.js | 8 ++++---- src/structures/GuildChannel.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 4eede05ddb30..1ba916704361 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -1163,7 +1163,7 @@ class Guild extends Base { * .catch(console.error); */ async setIcon(icon, reason) { - return this.edit({ icon: await DataResolver.resolveImage(icon), reason }); + return this.edit({ icon: await DataResolver.resolveImage(icon) }, reason); } /** @@ -1193,7 +1193,7 @@ class Guild extends Base { * .catch(console.error); */ async setSplash(splash, reason) { - return this.edit({ splash: await DataResolver.resolveImage(splash), reason }); + return this.edit({ splash: await DataResolver.resolveImage(splash) }, reason); } /** @@ -1208,7 +1208,7 @@ class Guild extends Base { * .catch(console.error); */ async setDiscoverySplash(discoverySplash, reason) { - return this.edit({ discoverySplash: await DataResolver.resolveImage(discoverySplash), reason }); + return this.edit({ discoverySplash: await DataResolver.resolveImage(discoverySplash) }, reason); } /** @@ -1222,7 +1222,7 @@ class Guild extends Base { * .catch(console.error); */ async setBanner(banner, reason) { - return this.edit({ banner: await DataResolver.resolveImage(banner), reason }); + return this.edit({ banner: await DataResolver.resolveImage(banner) }, reason); } /** diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 1a53fc7f4177..996b8e8c1a3b 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -209,7 +209,7 @@ class GuildChannel extends Channel { if (!Array.isArray(overwrites) && !(overwrites instanceof Collection)) { throw new TypeError('INVALID_TYPE', 'overwrites', 'Array or Collection of Permission Overwrites', true); } - await this.edit({ permissionOverwrites: overwrites, reason }); + await this.edit({ permissionOverwrites: overwrites }, reason); return this; }