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.
Parameter | Default | Description |
---|---|---|
client | required | A SkribbyClient instance |
api_data | required | Object 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"
});
Simply returns the bot ID.
string
console.log(bot.id);
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.
MeetingBotData
(object)
console.log(bot.data.transcription);
console.log(bot.data.participants);
console.log(bot.data.recording_url);
// ...
All methods (except getRealtimeClient
) interact with Skribby's server.
Refer to the SkribbyClient API Requests Throws section for more information on error handling.
Fetch the latest data from the server
void
await bot.refresh();
console.log(bot.data.status) // Contains latest data from server now
Send a chat message in the name of the bot.
Parameter | Default | Description |
---|---|---|
message | required | Text to be send to the chat |
void
await bot.sendChatMessage('This is a message!');
Request the bot to leave the meeting.
void
await bot.stop();
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!
void
await bot.delete();
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.
const realtimeClient = bot.getRealtimeClient();
bot.on('ts', data => {
console.log(`${data.speaker_name} said: ${data.transcript}`);
});
await bot.connect();