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