fix: add support for new guild feature GUILD_WEB_PAGE_VANITY_URL (#9219)

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
pkdev08
2023-04-01 18:34:07 -04:00
committed by GitHub
parent 79875658cf
commit de1aac674a

View File

@@ -633,9 +633,6 @@ class Guild extends AnonymousGuild {
* .catch(console.error);
*/
async fetchVanityData() {
if (!this.features.includes(GuildFeature.VanityURL)) {
throw new DiscordjsError(ErrorCodes.VanityURL);
}
const data = await this.client.rest.get(Routes.guildVanityUrl(this.id));
this.vanityURLCode = data.code;
this.vanityURLUses = data.uses;