Skip to content

Commit

Permalink
fix(CDNRoutes): inconsistency in route and wrong JSDoc (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
Backiscute committed Jul 20, 2024
1 parent 2c1ff0e commit eb7b3d9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,14 +1015,14 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
return `/icons/${guildId}/${guildIcon}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1101,7 +1101,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
Expand Down Expand Up @@ -1221,7 +1221,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
Expand Down
8 changes: 4 additions & 4 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,14 +1024,14 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
return `/icons/${guildId}/${guildIcon}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1110,7 +1110,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
Expand Down Expand Up @@ -1230,7 +1230,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
Expand Down
8 changes: 4 additions & 4 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,14 +1015,14 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
return `/icons/${guildId}/${guildIcon}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1101,7 +1101,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
Expand Down Expand Up @@ -1221,7 +1221,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
Expand Down
8 changes: 4 additions & 4 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,14 +1024,14 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
return `/icons/${guildId}/${guildIcon}.${format}` as const;
},

/**
Expand Down Expand Up @@ -1110,7 +1110,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
*
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
*
Expand Down Expand Up @@ -1230,7 +1230,7 @@ export const CDNRoutes = {

/**
* Route for:
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
Expand Down

0 comments on commit eb7b3d9

Please sign in to comment.