mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
chore: util.deprecate fetchVanityCode
This commit is contained in:
@@ -737,6 +737,7 @@ class Guild extends Base {
|
|||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
fetchVanityCode() {
|
fetchVanityCode() {
|
||||||
|
return require('util').deprecate(() => {
|
||||||
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'));
|
||||||
}
|
}
|
||||||
@@ -744,6 +745,7 @@ class Guild extends Base {
|
|||||||
.guilds(this.id, 'vanity-url')
|
.guilds(this.id, 'vanity-url')
|
||||||
.get()
|
.get()
|
||||||
.then(res => res.code);
|
.then(res => res.code);
|
||||||
|
}, 'fetchVanityCode() is deprecated. Use fetchVanityData() instead.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user