diff --git a/docs/_advanced/context.md b/docs/_advanced/context.md index 2512b7aa8..7f777b773 100644 --- a/docs/_advanced/context.md +++ b/docs/_advanced/context.md @@ -22,7 +22,9 @@ async function addTimezoneContext ({ payload, context, next }) { context.tz_offset = user.tz_offset; } -app.command('request', addTimezoneContext, async ({ command, context }) => { +app.command('request', addTimezoneContext, async ({ command, ack, context }) => { + // Acknowledge command request + ack(); // Get local hour of request const local_hour = (Date.UTC() + context.tz_offset).getHours(); diff --git a/docs/_basic/listening_responding_commands.md b/docs/_basic/listening_responding_commands.md index 81a2dd90f..18af5eb88 100644 --- a/docs/_basic/listening_responding_commands.md +++ b/docs/_basic/listening_responding_commands.md @@ -12,7 +12,10 @@ Similar to actions, there are two ways to respond to slash command requests. The ```javascript // The echo command simply echoes on command -app.command('/echo', async ({ command, say }) => { +app.command('/echo', async ({ command, ack, say }) => { + // Acknowledge command request + ack(); + say(`${command.text}`); }); ```