build: bump discord-api-types to 0.38.30 (#11178)

* build: bump discord-api-types to 0.38.30

* chore: slap the errors
This commit is contained in:
Naiyar
2025-10-15 00:02:10 +06:00
committed by GitHub
parent 93e96eb6c0
commit 1a305fe4ad
13 changed files with 36 additions and 31 deletions

View File

@@ -66,7 +66,7 @@
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@discordjs/util": "workspace:^",
"discord-api-types": "^0.38.29",
"discord-api-types": "^0.38.30",
"ts-mixer": "^6.0.4",
"tslib": "^2.8.1",
"zod": "^4.1.12"

View File

@@ -192,6 +192,8 @@ export function createComponentBuilder(
return data;
}
// should be removed in https://github.com/discordjs/discord.js/pull/11108
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (data.type) {
case ComponentType.ActionRow:
return new ActionRowBuilder(data);
@@ -226,7 +228,8 @@ export function createComponentBuilder(
case ComponentType.Label:
return new LabelBuilder(data);
default:
// @ts-expect-error This case can still occur if we get a newer unsupported component type
// should be uncommented in https://github.com/discordjs/discord.js/pull/11108
/* // @ts-expect-error This case can still occur if we get a newer unsupported component type */
throw new Error(`Cannot properly serialize component type: ${data.type}`);
}
}

View File

@@ -67,6 +67,7 @@ export class LabelBuilder extends ComponentBuilder<APILabelComponent> {
this.data = {
...structuredClone(rest),
// @ts-expect-error fixed in https://github.com/discordjs/discord.js/pull/11108
component: component ? createComponentBuilder(component) : undefined,
type: ComponentType.Label,
};

View File

@@ -44,6 +44,7 @@ export class ModalBuilder implements JSONEncodable<APIModalInteractionResponseCa
this.data = {
...structuredClone(rest),
// @ts-expect-error fixed in https://github.com/discordjs/discord.js/pull/11108
components: components.map((component) => createComponentBuilder(component)),
};
}

View File

@@ -70,7 +70,7 @@
"@discordjs/ws": "workspace:^",
"@sapphire/snowflake": "^3.5.5",
"@vladfrangu/async_event_emitter": "^2.4.7",
"discord-api-types": "^0.38.29"
"discord-api-types": "^0.38.30"
},
"devDependencies": {
"@discordjs/api-extractor": "workspace:^",

View File

@@ -74,7 +74,7 @@
"@discordjs/ws": "workspace:^",
"@sapphire/snowflake": "3.5.5",
"@vladfrangu/async_event_emitter": "^2.4.7",
"discord-api-types": "^0.38.29",
"discord-api-types": "^0.38.30",
"fast-deep-equal": "3.1.3",
"lodash.snakecase": "4.1.1",
"magic-bytes.js": "^1.12.1",

View File

@@ -55,7 +55,7 @@
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"discord-api-types": "^0.38.29"
"discord-api-types": "^0.38.30"
},
"devDependencies": {
"@discordjs/api-extractor": "workspace:^",

View File

@@ -72,7 +72,7 @@
"@discordjs/rest": "workspace:^",
"@discordjs/util": "workspace:^",
"@discordjs/ws": "workspace:^",
"discord-api-types": "^0.38.29"
"discord-api-types": "^0.38.30"
},
"devDependencies": {
"@discordjs/api-extractor": "workspace:^",

View File

@@ -88,7 +88,7 @@
"@sapphire/async-queue": "^1.5.5",
"@sapphire/snowflake": "^3.5.5",
"@vladfrangu/async_event_emitter": "^2.4.7",
"discord-api-types": "^0.38.29",
"discord-api-types": "^0.38.30",
"magic-bytes.js": "^1.12.1",
"tslib": "^2.8.1",
"undici": "7.16.0",

View File

@@ -63,7 +63,7 @@
"dependencies": {
"@discordjs/formatters": "workspace:^",
"@sapphire/snowflake": "^3.5.5",
"discord-api-types": "^0.38.29"
"discord-api-types": "^0.38.30"
},
"devDependencies": {
"@discordjs/api-extractor": "workspace:^",

View File

@@ -64,7 +64,7 @@
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@types/ws": "^8.18.1",
"discord-api-types": "^0.38.29",
"discord-api-types": "^0.38.30",
"prism-media": "^1.3.5",
"tslib": "^2.8.1",
"ws": "^8.18.3"

View File

@@ -78,7 +78,7 @@
"@sapphire/async-queue": "^1.5.5",
"@types/ws": "^8.18.1",
"@vladfrangu/async_event_emitter": "^2.4.7",
"discord-api-types": "^0.38.29",
"discord-api-types": "^0.38.30",
"tslib": "^2.8.1",
"ws": "^8.18.3"
},