fix send false for ack

This commit is contained in:
Cynthia Foxwell 2024-05-17 15:17:09 -06:00
parent 462763060b
commit 3988f45797

View file

@ -44,9 +44,9 @@ async function runCommand(interaction, command) {
} }
async function InteractionDispatcher(interaction) { async function InteractionDispatcher(interaction) {
interaction.acknowledge();
const command = hf.interactionCommands.get(interaction.data.name); const command = hf.interactionCommands.get(interaction.data.name);
const shouldSend = getOption(interaction, command, "send"); const shouldSend = getOption(interaction, command, "send");
interaction.acknowledge(shouldSend ? null : MessageFlags.EPHEMERAL);
try { try {
const response = await runCommand(interaction, command); const response = await runCommand(interaction, command);