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