From 4ceaadf71a2bcd03d72ea3516ba86ed4812ad383 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 22 Apr 2023 22:42:48 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20setBanner=20#633?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/structures/ClientUser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 268e973..a351610 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -197,10 +197,11 @@ class ClientUser extends User { * .then(user => console.log(`New banner set!`)) * .catch(console.error); */ - setBanner(banner) { + async setBanner(banner) { if (this.nitroType !== 'NITRO_BOOST') { throw new Error('You must be a Nitro Boosted User to change your banner.'); } + banner = banner && (await DataResolver.resolveImage(banner)); return this.edit({ banner }); }