Slack.Web.Assistant.Threads (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Set the status for an AI assistant thread.

Set suggested prompts for the given assistant thread

Set the title for the given assistant thread

Functions

set_status(channel_id, status, thread_ts, optional_params \\ %{})

Set the status for an AI assistant thread.

API reference

Rate limit: Special rate limits apply.
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - Channel ID containing the assistant thread.
  • status - Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent.
  • thread_ts - Message timestamp of the thread of where to set the status.

Optional Params

  • icon_emoji - Emoji to use as the icon for this message. Overrides icon_url. ex: :chart_with_upwards_trend:
  • icon_url - Image URL to use as the icon for this message. ex: http://lorempixel.com/48/48
  • loading_messages - The list of messages to rotate through as a loading indicator. Maximum of 10 messages.
  • username - The bot's username to display. ex: My Bot

Errors the API can return:

  • channel_not_found - Error returned when given an invalid channel_id
  • invalid_thread_ts - Error returned when given an invalid thread_ts
  • reserved_username - Reserved usernames are not allowed to be used.

See the Common Errors guide for errors returned by every Web API method.

set_suggested_prompts(channel_id, prompts, thread_ts, optional_params \\ %{})

Set suggested prompts for the given assistant thread

API reference

Rate limit: Tier 4: 100+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - Channel ID containing the assistant thread.
  • prompts - Each prompt should be supplied with its title and message attribute.
  • thread_ts - Message timestamp of the thread to set suggested prompts for.

Optional Params

  • title - Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.

Errors the API can return:

  • channel_not_found - Error returned when given an invalid channel_id
  • invalid_thread_ts - Thread not found
  • message_not_found - Error returned when given an invalid message

See the Common Errors guide for errors returned by every Web API method.

set_title(channel_id, thread_ts, title, optional_params \\ %{})

Set the title for the given assistant thread

API reference

Rate limit: Tier 4: 100+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel_id - Channel ID containing the assistant thread.
  • thread_ts - Message timestamp of the thread to set suggested prompts for.
  • title - The title to use for the thread.

Errors the API can return:

  • channel_not_found - Error returned when given an invalid channel_id
  • invalid_thread_ts - Thread not found

See the Common Errors guide for errors returned by every Web API method.