mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix: throw Error instead of rejecting Promise
This commit is contained in:
@@ -749,7 +749,7 @@ class Guild extends Base {
|
||||
*/
|
||||
fetchVanityCode() {
|
||||
if (!this.features.includes('VANITY_URL')) {
|
||||
return Promise.reject(new Error('VANITY_URL'));
|
||||
throw new Error('VANITY_URL');
|
||||
}
|
||||
return this.client.api
|
||||
.guilds(this.id, 'vanity-url')
|
||||
|
||||
Reference in New Issue
Block a user