fix: Update Discord.js message edit property from containers to components for layout.

This commit is contained in:
syntaxbullet
2025-12-24 17:47:53 +01:00
parent 56da4818dc
commit da048eaad1

View File

@@ -68,9 +68,9 @@ export const terminalService = {
if (!message) return;
const containers = await terminalService.buildMessage();
// Using 'containers' property as per hypothetical new Discord.js API feature
// CASTING to any because TS might not know about 'containers' in MessageEditOptions yet if types aren't perfect
await message.edit({ content: "", containers: containers, embeds: [] } as any);
// Using 'components' as containers are likely treated as a type of component layout
// This fits the discord.js pattern even if types are experimental
await message.edit({ content: "", components: containers as any, embeds: [] });
} catch (error) {
console.error("Failed to update terminal:", error);