From c53b23e0f320a85f70b39fbda56d5f26e7bd99a0 Mon Sep 17 00:00:00 2001 From: Eren <65873936+Aello1@users.noreply.github.com> Date: Mon, 18 May 2026 21:37:18 +0300 Subject: [PATCH] fix: propagate dbiInter.other to beforeInteraction ctx & new interaction.commandMessage feat --- src/methods/hookInteractionListeners.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/methods/hookInteractionListeners.ts b/src/methods/hookInteractionListeners.ts index 845ee4c..aa0bace 100644 --- a/src/methods/hookInteractionListeners.ts +++ b/src/methods/hookInteractionListeners.ts @@ -76,7 +76,7 @@ export function hookInteractionListeners(dbi: DBI): () => any { let data = parsedId?.data; let v2 = parsedId?.v2 || false; - let other = {}; + let other = { ...(dbiInter.other ?? {}) }; if ( !(await dbi.events.trigger("beforeInteraction", { @@ -231,6 +231,9 @@ export function hookInteractionListeners(dbi: DBI): () => any { v2 }; + if (inter.isChatInputCommand() && !(inter as any).fake) { + (inter as any).commandMessage = null; + } if (dbiInter.type === "HTMLComponentsV2") { // For HTMLComponentsV2, first element of data is the element name (button name, etc.)