mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat: make fetchVanityData an async function
This commit is contained in:
@@ -772,11 +772,11 @@ class Guild extends Base {
|
|||||||
* })
|
* })
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
fetchVanityData() {
|
async fetchVanityData() {
|
||||||
if (!this.features.includes('VANITY_URL')) {
|
if (!this.features.includes('VANITY_URL')) {
|
||||||
return Promise.reject(new Error('VANITY_URL'));
|
return Promise.reject(new Error('VANITY_URL'));
|
||||||
}
|
}
|
||||||
const data = this.client.api.guilds(this.id, 'vanity-url').get();
|
const data = await this.client.api.guilds(this.id, 'vanity-url').get();
|
||||||
this.vanityURLUses = data.uses;
|
this.vanityURLUses = data.uses;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Reference in New Issue
Block a user