mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat(Guild): add fetchVanityData (#4103)
* chore: deprecate Guild.fetchVanityCode()
* feat: add Guild.fetchVanityData()
* chore: update typings
* fix: remove redundant .then()
Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
* chore: fix lint
* chore: util.deprecate fetchVanityCode
* feat: add VanityData typedef and populate vanityURLUses
* chore: update typings
* chore: properly deprecate fetchVanityCode
* chore: fix jsdoc description for fetchVanityData
* feat: make fetchVanityData an async function
* chore: update Vanity typedef
* docs: update jsdoc
* feat: throw vanity url error instead of returning rejected promise
Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>
* docs: disable max-len rule and add info about receiving parameter
* fix: throw Error instead of rejecting Promise
* revert: revert "fix: throw Error instead of rejecting Promise"
This reverts commit 7ffd53eba4.
* fix: require DJSError to fix throwing VANITY_URL error
* nitpick: re-add TypeError to the import
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -638,6 +638,7 @@ declare module 'discord.js' {
|
||||
public systemChannelFlags: Readonly<SystemChannelFlags>;
|
||||
public systemChannelID: Snowflake | null;
|
||||
public vanityURLCode: string | null;
|
||||
public vanityURLUses: number | null;
|
||||
public verificationLevel: VerificationLevel;
|
||||
public readonly verified: boolean;
|
||||
public readonly voice: VoiceState | null;
|
||||
@@ -660,6 +661,7 @@ declare module 'discord.js' {
|
||||
public fetchInvites(): Promise<Collection<string, Invite>>;
|
||||
public fetchPreview(): Promise<GuildPreview>;
|
||||
public fetchVanityCode(): Promise<string>;
|
||||
public fetchVanityData(): Promise<{ code: string; uses: number }>;
|
||||
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
||||
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
||||
public iconURL(options?: ImageURLOptions & { dynamic?: boolean }): string | null;
|
||||
|
||||
Reference in New Issue
Block a user