Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class Guild extends Base {
/* eslint-disable max-len */
/**
* The use count of the vanity URL code of the guild, if any
* <info>You will need to fetch the guild using {@link Guild#fetchVanityCode} if you want to receive this parameter</info>
* <info>You will need to fetch this parameter using {@link Guild#fetchVanityData} if you want to receive it</info>
* @type {?number}
*/
this.vanityURLUses = null;
Expand Down Expand Up @@ -771,13 +771,7 @@ class Guild extends Base {
* .catch(console.error);
*/
fetchVanityCode() {
if (!this.features.includes('VANITY_URL')) {
return Promise.reject(new Error('VANITY_URL'));
}
return this.client.api
.guilds(this.id, 'vanity-url')
.get()
.then(res => res.code);
return this.fetchVanityData().then(vanity => vanity.code);
}

/**
Expand Down