mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat: make fetchVanityData an async function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user