diff --git a/deno/rest/v10/mod.ts b/deno/rest/v10/mod.ts index d9d57548..913ac155 100644 --- a/deno/rest/v10/mod.ts +++ b/deno/rest/v10/mod.ts @@ -934,6 +934,14 @@ export const Routes = { export const StickerPackApplicationId = '710982414301790216'; +export enum ImageFormat { + JPEG = 'jpeg', + PNG = 'png', + WebP = 'webp', + GIF = 'gif', + Lottie = 'json', +} + export const CDNRoutes = { /** * Route for: @@ -1112,7 +1120,7 @@ export const CDNRoutes = { * * This route supports the extensions: PNG, JPEG, WebP */ - storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) { + storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}` as const; }, @@ -1194,14 +1202,6 @@ export type RoleIconFormat = Exclude; export type GuildMemberBannerFormat = Exclude; -export enum ImageFormat { - JPEG = 'jpeg', - PNG = 'png', - WebP = 'webp', - GIF = 'gif', - Lottie = 'json', -} - export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter diff --git a/deno/rest/v9/mod.ts b/deno/rest/v9/mod.ts index 84aec1fb..6817d3f8 100644 --- a/deno/rest/v9/mod.ts +++ b/deno/rest/v9/mod.ts @@ -943,6 +943,14 @@ export const Routes = { export const StickerPackApplicationId = '710982414301790216'; +export enum ImageFormat { + JPEG = 'jpeg', + PNG = 'png', + WebP = 'webp', + GIF = 'gif', + Lottie = 'json', +} + export const CDNRoutes = { /** * Route for: @@ -1121,7 +1129,7 @@ export const CDNRoutes = { * * This route supports the extensions: PNG, JPEG, WebP */ - storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) { + storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}` as const; }, @@ -1203,14 +1211,6 @@ export type RoleIconFormat = Exclude; export type GuildMemberBannerFormat = Exclude; -export enum ImageFormat { - JPEG = 'jpeg', - PNG = 'png', - WebP = 'webp', - GIF = 'gif', - Lottie = 'json', -} - export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter diff --git a/rest/v10/index.ts b/rest/v10/index.ts index ef274318..36287ced 100644 --- a/rest/v10/index.ts +++ b/rest/v10/index.ts @@ -934,6 +934,14 @@ export const Routes = { export const StickerPackApplicationId = '710982414301790216'; +export enum ImageFormat { + JPEG = 'jpeg', + PNG = 'png', + WebP = 'webp', + GIF = 'gif', + Lottie = 'json', +} + export const CDNRoutes = { /** * Route for: @@ -1112,7 +1120,7 @@ export const CDNRoutes = { * * This route supports the extensions: PNG, JPEG, WebP */ - storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) { + storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}` as const; }, @@ -1194,14 +1202,6 @@ export type RoleIconFormat = Exclude; export type GuildMemberBannerFormat = Exclude; -export enum ImageFormat { - JPEG = 'jpeg', - PNG = 'png', - WebP = 'webp', - GIF = 'gif', - Lottie = 'json', -} - export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter diff --git a/rest/v9/index.ts b/rest/v9/index.ts index 503b098b..23207ed0 100644 --- a/rest/v9/index.ts +++ b/rest/v9/index.ts @@ -943,6 +943,14 @@ export const Routes = { export const StickerPackApplicationId = '710982414301790216'; +export enum ImageFormat { + JPEG = 'jpeg', + PNG = 'png', + WebP = 'webp', + GIF = 'gif', + Lottie = 'json', +} + export const CDNRoutes = { /** * Route for: @@ -1121,7 +1129,7 @@ export const CDNRoutes = { * * This route supports the extensions: PNG, JPEG, WebP */ - storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat) { + storePageAsset(applicationId: Snowflake, assetId: string, format: StorePageAssetFormat = ImageFormat.PNG) { return `/app-assets/${applicationId}/store/${assetId}.${format}` as const; }, @@ -1203,14 +1211,6 @@ export type RoleIconFormat = Exclude; export type GuildMemberBannerFormat = Exclude; -export enum ImageFormat { - JPEG = 'jpeg', - PNG = 'png', - WebP = 'webp', - GIF = 'gif', - Lottie = 'json', -} - export interface CDNQuery { /** * The returned image can have the size changed by using this query parameter