Language

SlackStream.StopAsync Method

Definition

Overloads

Name Description
StopAsync(IList<Chunk>, IList<Object>)

Stops the active Slack message stream for the specified channel and message.

StopAsync(IList<Chunk>, String)

Stops the active Slack message stream for the current channel and message, optionally updating the message with the specified chunks and blocks.

StopAsync(IList<Chunk>, IList<Object>)

Stops the active Slack message stream for the specified channel and message.

public System.Threading.Tasks.Task StopAsync(System.Collections.Generic.IList<Microsoft.Agents.Extensions.Slack.Api.Chunk>? chunks = default, System.Collections.Generic.IList<object>? blocks = default);
member this.StopAsync : System.Collections.Generic.IList<Microsoft.Agents.Extensions.Slack.Api.Chunk> * System.Collections.Generic.IList<obj> -> System.Threading.Tasks.Task
Public Function StopAsync (Optional chunks As IList(Of Chunk) = Nothing, Optional blocks As IList(Of Object) = Nothing) As Task

Parameters

chunks
IList<Chunk>

An optional list of message chunks to include in the stop request. May be null to omit chunks.

blocks
IList<Object>

An optional list of block elements to include in the stop request. May be null to omit blocks.

Returns

A task that represents the asynchronous stop operation.

Remarks

See https://docs.slack.dev/reference/methods/chat.stopStream

Applies to

StopAsync(IList<Chunk>, String)

Stops the active Slack message stream for the current channel and message, optionally updating the message with the specified chunks and blocks.

public System.Threading.Tasks.Task StopAsync(System.Collections.Generic.IList<Microsoft.Agents.Extensions.Slack.Api.Chunk>? chunks = default, string? blocks = default);
member this.StopAsync : System.Collections.Generic.IList<Microsoft.Agents.Extensions.Slack.Api.Chunk> * string -> System.Threading.Tasks.Task
Public Function StopAsync (Optional chunks As IList(Of Chunk) = Nothing, Optional blocks As String = Nothing) As Task

Parameters

chunks
IList<Chunk>

An optional list of chunks to include in the final message update. If null, no chunks are sent.

blocks
String

An optional JSON string representing the message blocks to update. Must be a JSON array or an object containing a "blocks" property with a JSON array value. If null, no blocks are updated.

Returns

A task that represents the asynchronous stop operation.

Exceptions

Thrown if blocks is a JSON object that does not contain a "blocks" property with a JSON array value, or if blocks is not a valid JSON array or object.

Remarks

This method calls the Slack API method "chat.stopStream" to end the message stream. The blocks parameter must conform to Slack's block kit structure.

See https://docs.slack.dev/reference/methods/chat.stopStream

Applies to