Skip to content
Calab

Bots

A bot is a member like everyone else

Create a bot in the workspace settings and give it a role — it works through the same API as the app: chat, commands, voice.

Rights come from roles, as for people: a bot sees only the rooms it was let into.

Bots

  • Chat

    Reads and writes messages, replies, reacts, sends files and stickers, writes direct messages. Events arrive in real time over WebSocket.

  • Voice

    Joins a voice room through LiveKit: hears the participants and speaks itself — text to speech, echo, music, recording. In Node, Python or Go.

  • Commands

    Registers /commands — the composer suggests them on “/”. A /cmd message reaches the bot with its arguments parsed.

  • Webhook

    No open connection needed: events arrive as signed (HMAC) POST requests, retried on failure. Handy for serverless.

@calaba/bot-sdk

An echo bot in TypeScript

import { Bot } from '@calaba/bot-sdk';const bot = new Bot(process.env.BOT_TOKEN, { server: 'https://app.calab.ru' });await bot.commands([{ name: 'echo', description: 'Repeat the text' }]);// every message from someone elsebot.on('message', (m) => bot.reply(m, m.content));// "/echo hi" → "hi"bot.on('command', (c) => bot.reply(c, c.args || 'Usage: /echo <text>'));await bot.start();
This one and three more — voice echo, text to speech and a Python listener — are in examples/bots.

Bots

Your first bot in 5 minutes

Token, REST, events, webhook, voice, limits and error codes — all in the docs.