Skip to content
Last updated

[C] MeetingBot

constructor

Creates a meeting bot instance to interact with this bot. You normally wouldn't need to instantiate this class manually. When creating or fetching bots via the SkribbyClient, an instance of this class will be returned.

ParameterDefaultDescription
clientrequiredA SkribbyClient instance
api_datarequiredObject containing API Data of a bot (Refer to Get Bot Endpoint)
import { MeetingBot } from '@skribby/sdk'

const bot = new MeetingBot(client, {
  "id": "3c09b2aa-6708-42c1-8145-aa55ee223613",
  "status": "scheduled",
  "service": "gmeet",
  "scheduled_for": "2019-08-24T14:15:22Z",
  "time_limit": 0,
  "bot_name": "string",
  "bot_avatar": "http://example.com",
  "meeting_url": "http://example.com",
  "webhook_url": "http://example.com",
  "recording_url": "http://example.com",
  "recording_available_until": "2019-08-24T14:15:22Z",
  "websocket_url": "http://example.com",
  "video": true,
  "lang": "string",
  "detected_lang": "string",
  "transcript": [
    {
      "start": 4,
      "end": 5.62,
      "speaker": 0,
      "speaker_name": "John Doe",
      "confidence": 0.9980372,
      "transcript": "This is a quick test.",
      "utterances": [
        {}
      ]
    }
  ],
  "transcription_model": "string",
  "participants": [
    {
      "name": "John Doe",
      "avatar": "https://picsum.photos/50",
      "first_seen_at": "2025-06-25T03:03:15.913000Z",
      "events": [
        {
          "type": "started-speaking",
          "timestamp": 1750820602963
        }
      ]
    }
  ],
  "events": [
    {
      "event": "status_update",
      "data": {
        "old_status": "joining",
        "new_status": "recording"
      },
      "created_at": "2019-08-24T14:15:22Z"
    }
  ],
  "profanity_filter": true,
  "created_at": "2019-08-24T14:15:22Z",
  "finished_at": "2019-08-24T14:15:22Z"
});

Properties

id

Simply returns the bot ID.

Returns

string

Example

console.log(bot.id);

data

Returns the data available on this bot.
Returned data is identical to returned data from Get Bot Endpoint with the only exception that dates have been parsed to Date objects already.

Returns

MeetingBotData (object)

Example

console.log(bot.data.transcription);
console.log(bot.data.participants);
console.log(bot.data.recording_url);
// ...

Methods

Error Handling

All methods (except getRealtimeClient) interact with Skribby's server.
Refer to the SkribbyClient API Requests Throws section for more information on error handling.

refresh

Fetch the latest data from the server

Returns

void

Example

await bot.refresh();
console.log(bot.data.status) // Contains latest data from server now

sendChatMessage

Send a chat message in the name of the bot.

Parameters

ParameterDefaultDescription
messagerequiredText to be send to the chat

Returns

void

Example

await bot.sendChatMessage('This is a message!');

stop

Request the bot to leave the meeting.

Returns

void

Example

await bot.stop();

delete

Delete all data related to the bot, including transcription and recording.
Bots can only be deleted if they are scheduled or not in an active state (booting, joining, recording, processing or transcribing).
Be aware, this action is not reversible!

Returns

void

Example

await bot.delete();

getRealtimeClient

If the models supports realtime, then through the RealtimeClient you can directly connect with the websocket server for live updates and to interact with the bot.

Returns

RealtimeClient

Example

const realtimeClient = bot.getRealtimeClient();
bot.on('ts', data => {
  console.log(`${data.speaker_name} said: ${data.transcript}`);
});
await bot.connect();