Class ChatMessage.ChatMessageBuilder
- Enclosing class:
- ChatMessage
-
Method Summary
Modifier and TypeMethodDescriptionbroadcasterId(@NotNull String broadcasterId) The ID of the broadcaster whose chat room the message will be sent to.build()forSourceOnly(@Nullable Boolean forSourceOnly) Whether the chat message is sent only to the source channel (broadcaster_id) during a shared chat session.The message to send.replyParentMessageId(@Nullable String replyParentMessageId) The ID of the chat message being replied to, if any.The ID of the user sending the message.toString()
-
Method Details
-
broadcasterId
The ID of the broadcaster whose chat room the message will be sent to.- Returns:
this.
-
senderId
The ID of the user sending the message.This ID must match the user ID in the user access token (if not using an app access token).
- Returns:
this.
-
message
The message to send.The message is limited to a maximum of 500 characters.
- Returns:
this.
-
replyParentMessageId
public ChatMessage.ChatMessageBuilder replyParentMessageId(@Nullable @Nullable String replyParentMessageId) The ID of the chat message being replied to, if any.- Returns:
this.
-
forSourceOnly
Whether the chat message is sent only to the source channel (broadcaster_id) during a shared chat session.NOTE: Can only be set when utilizing an App Access Token at the top. Cannot be specified when a User Access Token is used and will result in a 400 error.
Has no effect if the message is not sent during a shared chat session.
Introduced in April 2025, the default is temporarily “false”. On May 19, 2025 the default value for the for_source_only parameter will be updated to “true” (i.e. chat messages will be only shared with the source channel by default). If you prefer to send a chat message to both channels in a shared chat session, make sure this parameter is explicitly set to “false” in your API request before May 19.
- Returns:
this.
-
build
-
toString
-