mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
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:
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user