Chat Messages
Use async.messages.send(...) when engine v2 code should send chat messages without waiting for a backend send result. Use messages.send(...) only when the script needs the returned message object.
messages.send(...) and async.messages.send(...) are only available in engine v2. Engine v1 usually sends one rendered response and does not have these helpers.
Send async message
Queues one Kick chat message without waiting for the backend send result.
async.messages.send("Hello chat!");
const roll = random.int(1, 100);
async.messages.send(`${sender.username} rolled ${roll}.`);
if (roll === 100) {
async.messages.send("Perfect roll!");
}
API reference
async.messages.send
async.messages.send(content, options?)
Input
contentstringnumberbooleanobjectMessage content. Values are converted to text before sending.
optionsoptionalobjectOptional send settings.
replyToMessageIdoptionalstringKick message ID that should receive the reply.
Output
voidThe message is queued as a side effect.
Reply async message
Queues a reply to the triggering command message without waiting for the backend send result.
async.messages.reply("This is a reply.");
async.messages.reply("This replies to another message.", {
replyToMessageId: "other-message-id",
});
async.messages.send("This is a manual reply.", {
replyToMessageId: message.id,
});
async.messages.send(...) and messages.send(...) do not use the command's asResponse reply target automatically. Use async.messages.reply(...) or messages.reply(...) to reply to the triggering command message, or pass replyToMessageId explicitly. asResponse only applies to the rendered command response.
Reply helpers need a command message context unless you pass replyToMessageId. Custom messages expose their triggering Kick message as kickMessage when one exists. Periodic messages, alerts, stream titles, and test snippets without event data do not have a triggering chat message ID.
API reference
async.messages.reply
async.messages.reply(content, options?)
Input
contentstringnumberbooleanobjectReply content. Values are converted to text before sending.
optionsoptionalobjectOptional reply target override.
replyToMessageIdoptionalstringKick message ID that should receive the reply.
Output
voidThe reply is queued as a side effect.
Send sync message
Sends one Kick chat message and returns the sent message object when available.
Use this synchronous helper when later code needs the returned message object.
const sent = messages.send("First message");
messages.send("Reply to first message", {
replyToMessageId: sent.id,
});
When replyToMessageId is set, the returned object includes it too. In local CLI/test execution without a backend, messages.send(...) uses the same object shape but cannot include a real Kick ID.
API reference
messages.send
messages.send(content, options?)
Input
contentstringnumberbooleanobjectMessage content. Values are converted to text before sending.
optionsoptionalobjectOptional send settings.
replyToMessageIdoptionalstringKick message ID that should receive the reply.
Output
objectThe sent message shape. Live backend execution includes the Kick message id when available.
idoptionalstringKick message ID returned by the backend when available.
contentstringTrimmed chat message content.
replyToMessageIdoptionalstringReply target message ID when the message was sent as a reply.
Example output
{
"id": "msg_456",
"content": "First message",
"replyToMessageId": "msg_123"
}
Reply sync message
Replies to the triggering command message, or to an explicit replyToMessageId.
Use this synchronous helper when later code needs the returned reply message object.
const reply = messages.reply("This is a tracked reply.");
log(reply.id ?? "No live Kick message ID in test runs.");
API reference
messages.reply
messages.reply(content, options?)
Input
contentstringnumberbooleanobjectReply content. Values are converted to text before sending.
optionsoptionalobjectOptional reply target override.
replyToMessageIdoptionalstringKick message ID that should receive the reply.
Output
objectThe sent reply message shape.
idoptionalstringKick message ID returned by the backend when available.
contentstringTrimmed reply content.
replyToMessageIdoptionalstringReply target message ID.
Example output
{
"id": "msg_789",
"content": "Thanks!",
"replyToMessageId": "msg_123"
}
Limits
Kicklet applies send limits before posting messages to Kick:
| Limit | Behavior |
|---|---|
| Empty messages | Ignored after trimming whitespace. |
| Message count | At most 5 messages.send(...) messages are sent per render. |
| Message length | Each sent message is trimmed to 500 characters. |
| Rate limit | Outbound script messages are rate-limited per account. |
| Test renders | Test runs show the messages that would be sent. |
The rendered command response is handled separately from the messages.send(...) message list.
In Advanced Script code, messages.send(...) and messages.reply(...) are synchronous and wait for the backend send result. Use async.messages.send(...) or async.messages.reply(...) when the send should be queued fire-and-forget instead.