slack slash commands show response only to channel

2019-07-12 02:21发布

问题:

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:

in_channel example:

Question:

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

回答1:

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