mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
feat: dynamic property for ImageURLOptions (#3530)
* Added dynamic property to ImageURLOptions * fixes * order * typings fix * made dynamic false by default * add curly spaces
This commit is contained in:
22
typings/index.d.ts
vendored
22
typings/index.d.ts
vendored
@@ -272,9 +272,9 @@ declare module 'discord.js' {
|
||||
public name: string;
|
||||
public owner: User | Team | null;
|
||||
public rpcOrigins: string[];
|
||||
public coverImage(options?: AvatarOptions): string;
|
||||
public coverImage(options?: ImageURLOptions): string;
|
||||
public fetchAssets(): Promise<ClientApplicationAsset>;
|
||||
public iconURL(options?: AvatarOptions): string;
|
||||
public iconURL(options?: ImageURLOptions): string;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ declare module 'discord.js' {
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
|
||||
public iconURL(options?: AvatarOptions): string;
|
||||
public iconURL(options?: ImageURLOptions): string;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
}
|
||||
@@ -726,7 +726,7 @@ declare module 'discord.js' {
|
||||
public widgetChannelID: Snowflake | null;
|
||||
public widgetEnabled: boolean | null;
|
||||
public addMember(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
|
||||
public bannerURL(options?: AvatarOptions): string | null;
|
||||
public bannerURL(options?: ImageURLOptions): string | null;
|
||||
public createIntegration(data: IntegrationData, reason?: string): Promise<Guild>;
|
||||
public delete(): Promise<Guild>;
|
||||
public edit(data: GuildEditData, reason?: string): Promise<Guild>;
|
||||
@@ -740,7 +740,7 @@ declare module 'discord.js' {
|
||||
public fetchVanityCode(): Promise<string>;
|
||||
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
||||
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
||||
public iconURL(options?: AvatarOptions): string | null;
|
||||
public iconURL(options?: ImageURLOptions & { dynamic?: boolean }): string | null;
|
||||
public leave(): Promise<Guild>;
|
||||
public member(user: UserResolvable): GuildMember | null;
|
||||
public setAFKChannel(afkChannel: ChannelResolvable | null, reason?: string): Promise<Guild>;
|
||||
@@ -759,7 +759,7 @@ declare module 'discord.js' {
|
||||
public setSystemChannel(systemChannel: ChannelResolvable | null, reason?: string): Promise<Guild>;
|
||||
public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
|
||||
public setVerificationLevel(verificationLevel: number, reason?: string): Promise<Guild>;
|
||||
public splashURL(options?: AvatarOptions): string | null;
|
||||
public splashURL(options?: ImageURLOptions): string | null;
|
||||
public toJSON(): object;
|
||||
public toString(): string;
|
||||
}
|
||||
@@ -1189,8 +1189,8 @@ declare module 'discord.js' {
|
||||
public largeText: string | null;
|
||||
public smallImage: Snowflake | null;
|
||||
public smallText: string | null;
|
||||
public largeImageURL(options: AvatarOptions): string | null;
|
||||
public smallImageURL(options: AvatarOptions): string | null;
|
||||
public largeImageURL(options: ImageURLOptions): string | null;
|
||||
public smallImageURL(options: ImageURLOptions): string | null;
|
||||
}
|
||||
|
||||
export class Role extends Base {
|
||||
@@ -1421,10 +1421,10 @@ declare module 'discord.js' {
|
||||
public system?: boolean;
|
||||
public readonly tag: string;
|
||||
public username: string;
|
||||
public avatarURL(options?: AvatarOptions): string | null;
|
||||
public avatarURL(options?: ImageURLOptions & { dynamic?: boolean }): string | null;
|
||||
public createDM(): Promise<DMChannel>;
|
||||
public deleteDM(): Promise<DMChannel>;
|
||||
public displayAvatarURL(options?: AvatarOptions): string;
|
||||
public displayAvatarURL(options?: ImageURLOptions & { dynamic?: boolean }): string;
|
||||
public equals(user: User): boolean;
|
||||
public fetch(): Promise<User>;
|
||||
public toString(): string;
|
||||
@@ -2011,7 +2011,7 @@ declare module 'discord.js' {
|
||||
new?: any;
|
||||
}
|
||||
|
||||
interface AvatarOptions {
|
||||
interface ImageURLOptions {
|
||||
format?: ImageExt;
|
||||
size?: ImageSize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user