Skip to content

Widget.streamerbot

Widget.streamerbot.on(event, handler): void

A raw Streamer.bot event, exactly as it arrives: "Twitch.StreamOnline", or "Twitch.*" for every event of a source. The handler receives { event: { source, type }, data, timeStamp }. Events from a platform turned off in “Platforms” do not arrive. TikTok ones ("TikTok.Gift", "TikTok.*") carry the TikFinity data as is, including every packet of a gift streak.

For the events in the reference, prefer Widget.on: it gives normalized fields.

Widget.streamerbot.doAction(name, args?): Promise<unknown>

Runs a Streamer.bot action. It must be declared in actions of manifest.json; otherwise it fails with an error listing the declared ones. “Configure” shows the viewer which actions your widget uses.

Widget.streamerbot.sendMessage(platform, message, options?): Promise<unknown>

Sends a chat message to "twitch", "kick" or "youtube". It needs "sendMessage": true in manifest.json and the viewer to set the Streamer.bot password in “Connection”. Up to 500 characters. options accepts bot (write as the bot) and replyId (reply to a message).