mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
chore: bump dependencies (#11051)
* chore: bump dependencies * build: bump discord-api-types to 0.38.22 * fix: fix builders --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -182,6 +182,8 @@ export function createComponentBuilder(
|
||||
return data;
|
||||
}
|
||||
|
||||
// https://github.com/discordjs/discord.js/pull/11034
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (data.type) {
|
||||
case ComponentType.ActionRow:
|
||||
return new ActionRowBuilder(data);
|
||||
@@ -214,7 +216,6 @@ export function createComponentBuilder(
|
||||
case ComponentType.Container:
|
||||
return new ContainerBuilder(data);
|
||||
default:
|
||||
// @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}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user