diff --git a/bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java b/bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java index 31de66edd..f06cf7cf6 100644 --- a/bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java +++ b/bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java @@ -123,6 +123,19 @@ public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List prompts, String title) throws IOException, SlackApiException { + if (isAssistantThreadEvent()) { + return this.client().assistantThreadsSetSuggestedPrompts(r -> r + .channelId(this.getChannelId()) + .threadTs(this.getThreadTs()) + .prompts(prompts) + .title(title) + ); + } else { + throw new IllegalStateException("This utility is only available for Assistant feature enabled app!"); + } + } + // X-Slack-Retry-Num: 2 in HTTP Mode // "retry_attempt": 0, in Socket Mode private Integer retryNum;