await ack

This commit is contained in:
Cynthia Foxwell 2024-05-18 19:08:16 -06:00
parent ecef440d73
commit 80833c60a2

View file

@ -46,7 +46,7 @@ async function runCommand(interaction, command) {
async function InteractionDispatcher(interaction) { async function InteractionDispatcher(interaction) {
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 ? 0 : MessageFlags.EPHEMERAL); await interaction.acknowledge(shouldSend ? 0 : MessageFlags.EPHEMERAL);
try { try {
const response = await runCommand(interaction, command); const response = await runCommand(interaction, command);