Skip to content

Commit

Permalink
feat(StickerFormatType): add GIF (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jan 10, 2023
1 parent e2fb5ee commit a6bcb3f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions deno/payloads/v10/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
GIF,
}

/**
Expand Down
1 change: 1 addition & 0 deletions deno/payloads/v9/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
GIF,
}

/**
Expand Down
4 changes: 2 additions & 2 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ export const CDNRoutes = {
* Route for:
* - GET `/stickers/{sticker.id}.{png|json}`
*
* This route supports the extensions: PNG, Lottie
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
return `/stickers/${stickerId}.${format}` as const;
Expand Down Expand Up @@ -1116,7 +1116,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v10/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface RESTPostAPIGuildStickerFormDataBody {
*/
tags: string;
/**
* The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB
* The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 500 KB
*/
file: unknown;
}
Expand Down
4 changes: 2 additions & 2 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ export const CDNRoutes = {
* Route for:
* - GET `/stickers/{sticker.id}.{png|json}`
*
* This route supports the extensions: PNG, Lottie
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
return `/stickers/${stickerId}.${format}` as const;
Expand Down Expand Up @@ -1125,7 +1125,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
Expand Down
2 changes: 1 addition & 1 deletion deno/rest/v9/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface RESTPostAPIGuildStickerFormDataBody {
*/
tags: string;
/**
* The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB
* The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 500 KB
*/
file: unknown;
}
Expand Down
1 change: 1 addition & 0 deletions payloads/v10/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
GIF,
}

/**
Expand Down
1 change: 1 addition & 0 deletions payloads/v9/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
GIF,
}

/**
Expand Down
4 changes: 2 additions & 2 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ export const CDNRoutes = {
* Route for:
* - GET `/stickers/{sticker.id}.{png|json}`
*
* This route supports the extensions: PNG, Lottie
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
return `/stickers/${stickerId}.${format}` as const;
Expand Down Expand Up @@ -1116,7 +1116,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
Expand Down
2 changes: 1 addition & 1 deletion rest/v10/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface RESTPostAPIGuildStickerFormDataBody {
*/
tags: string;
/**
* The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB
* The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 500 KB
*/
file: unknown;
}
Expand Down
4 changes: 2 additions & 2 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ export const CDNRoutes = {
* Route for:
* - GET `/stickers/{sticker.id}.{png|json}`
*
* This route supports the extensions: PNG, Lottie
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
return `/stickers/${stickerId}.${format}` as const;
Expand Down Expand Up @@ -1125,7 +1125,7 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
Expand Down
2 changes: 1 addition & 1 deletion rest/v9/sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface RESTPostAPIGuildStickerFormDataBody {
*/
tags: string;
/**
* The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB
* The sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 500 KB
*/
file: unknown;
}
Expand Down

0 comments on commit a6bcb3f

Please sign in to comment.