mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat: throw vanity url error instead of returning rejected promise
Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -774,7 +774,7 @@ class Guild extends Base {
|
||||
*/
|
||||
async fetchVanityData() {
|
||||
if (!this.features.includes('VANITY_URL')) {
|
||||
return Promise.reject(new Error('VANITY_URL'));
|
||||
throw new Error('VANITY_URL');
|
||||
}
|
||||
const data = await this.client.api.guilds(this.id, 'vanity-url').get();
|
||||
this.vanityURLUses = data.uses;
|
||||
|
||||
Reference in New Issue
Block a user