Skip to content

Interface: AnnounceCreateData ​

Describes a multi-channel announcement played by k.announces.announce: a single message can be broadcast simultaneously across several "tracks" (chat, screen, text-to-speech, Discord…).

Remarks ​

If no track is enabled, the announcement falls back to the default tracks configured in the channel's preferences. For each enabled track, a message is picked at random from its variations, or otherwise from messages.

Properties ​

_ref? ​

ts
optional _ref?: string;

Reference to the streamer-configured announcement this object was read from, set by the platform on every announces preference. Never set it yourself.

Remarks ​

When present, the announcement is played from its stored configuration: the server reads the tracks, the variations and the Discord webhook straight from the channel's settings. Any track you override on the object is therefore ignored — pass a literal object (with no _ref) if you want to build the announcement yourself.


channelDashboardEvent? ​

ts
optional channelDashboardEvent?: AnnounceTrackData;

"Dashboard event" track: surfaces the message in the streamer's dashboard. The first line becomes the event title, the remaining lines its body.


chatAction? ​

ts
optional chatAction?: AnnounceTrackData;

"Chat action" track (message sent into the chat).


chatAnnounce? ​

ts
optional chatAnnounce?: AnnounceTrackData & {
  color?: AnnounceColor;
};

"Colored Twitch announcement" track, with its banner color.

Type declaration ​

color? ​
ts
optional color?: AnnounceColor;

chatMessage? ​

ts
optional chatMessage?: AnnounceTrackData;

"Twitch chat message" track.


discord? ​

ts
optional discord?: AnnounceTrackData & {
  webhook?: string | boolean;
};

"Discord message" track.

Type declaration ​

webhook? ​
ts
optional webhook?: string | boolean;

Remarks ​

On an announcement read from the preferences, webhook is a boolean telling whether the streamer configured one — the URL itself never leaves the server. Pass a real webhook URL only when you build the announcement yourself, which requires the discord:message scope.


enabled? ​

ts
optional enabled?: boolean;

Enables or disables the announcement as a whole. If false, nothing is broadcast.

Default Value ​

true


messages? ​

ts
optional messages?: string[];

Fallback messages, shared by every track that does not have its own variations.


screenAnnounce? ​

ts
optional screenAnnounce?: AnnounceTrackData & {
  options?: AnnounceOptions;
};

"On-screen announcement" track (overlay), with its own display options.

Type declaration ​

options? ​
ts
optional options?: AnnounceOptions;

screenNotification? ​

ts
optional screenNotification?: AnnounceTrackData & {
  options?: NotificationOptions;
};

"On-screen notification" track (overlay), with its own display options.

Type declaration ​

options? ​
ts
optional options?: NotificationOptions;

service? ​

ts
optional service?: AnnounceTrackData & {
  services?: string[];
};

"Service call" track: forwards the message to the named services.

Type declaration ​

services? ​
ts
optional services?: string[];

textToSpeech? ​

ts
optional textToSpeech?: AnnounceTrackData & {
  options?: {
     target?: "main" | "current";
  };
};

"Text-to-speech" track.

Type declaration ​

options? ​
ts
optional options?: {
  target?: "main" | "current";
};
options.target? ​
ts
optional target?: "main" | "current";

textTransform? ​

ts
optional textTransform?: "aiEnrich";

Transformation applied to the message before broadcast ("aiEnrich" enriches the text via AI).

Default Value ​

null