From 7d881fde80d45915865b38171e084a201e1d8e95 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Mon, 20 Apr 2020 03:52:40 +1000 Subject: [PATCH] feat: make fetchVanityData an async function --- src/structures/Guild.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 7d51b6f2e..7fe6d312b 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -772,11 +772,11 @@ class Guild extends Base { * }) * .catch(console.error); */ - fetchVanityData() { + async fetchVanityData() { if (!this.features.includes('VANITY_URL')) { return Promise.reject(new Error('VANITY_URL')); } - const data = this.client.api.guilds(this.id, 'vanity-url').get(); + const data = await this.client.api.guilds(this.id, 'vanity-url').get(); this.vanityURLUses = data.uses; return data;