sendAnnouncement

suspend fun sendAnnouncement(broadcasterId: String, moderatorId: String, message: String, color: AnnouncementColor = AnnouncementColor.PRIMARY, sourceOnly: Boolean? = null)

Twitch API: Send Chat Announcement

Sends an announcement to the broadcaster's chat room.

Parameters

broadcasterId

the ID of the broadcaster that owns the chat room to send the announcement to.

moderatorId

the ID of a user who has permission to moderate the broadcaster's chat room, or the broadcaster's ID if they're sending the announcement. This ID must match the user ID in the user access token.

message

the announcement to make in the broadcaster's chat room. Announcements are limited to a maximum of 500 characters; announcements longer than 500 characters are truncated.

color

the color used to highlight the announcement. Possible case-sensitive values are: blue, green, orange, purple, primary (default). If color is set to primary or is not set, the channel's accent color is used to highlight the announcement.

sourceOnly

determines if the chat announcement is sent only to the source channel during a shared chat session. This parameter can only be set when utilizing an App Access Token. Defaults to false.