Search code examples
slack-apislack

slack slash commands show response only to channel


slack provides only two types of responses:

  • ephemeral = make the command and response shown to the user only.
  • in_channel = make the command and response shown to all users in channel.

ephemeral example:

ephemeral response

in_channel example:

in_channel response

Question:

how can i make a slash command show response only in channel and not show both command and response?


Solution

  • ok so i found my question's answer, it is said in slack's api that

    The only user-facing difference between immediate responses and delayed responses is that "in channel" delayed responses will not include the initial command sent by the user. To echo the command back to the channel, you'll still need to provide a response to Slack's original visit to your invocation URL.

    reference https://api.slack.com/slash-commands#responding_to_a_command