File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ class Guild extends Base {
336336 /* eslint-disable max-len */
337337 /**
338338 * The use count of the vanity URL code of the guild, if any
339- * <info>You will need to fetch the guild using {@link Guild#fetchVanityCode } if you want to receive this parameter </info>
339+ * <info>You will need to fetch this parameter using {@link Guild#fetchVanityData } if you want to receive it </info>
340340 * @type {?number }
341341 */
342342 this . vanityURLUses = null ;
@@ -771,13 +771,7 @@ class Guild extends Base {
771771 * .catch(console.error);
772772 */
773773 fetchVanityCode ( ) {
774- if ( ! this . features . includes ( 'VANITY_URL' ) ) {
775- return Promise . reject ( new Error ( 'VANITY_URL' ) ) ;
776- }
777- return this . client . api
778- . guilds ( this . id , 'vanity-url' )
779- . get ( )
780- . then ( res => res . code ) ;
774+ return this . fetchVanityData ( ) . then ( vanity => vanity . code ) ;
781775 }
782776
783777 /**
You can’t perform that action at this time.
0 commit comments