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.
| 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',
custom_metadata: {
request_id: 'req_123',
customer_id: 'acme-42',
},
recording_url: 'http://example.com',
recording_available_until: '2019-08-24T14:15:22Z',
websocket_url: 'wss://example.com',
websocket_audio_url: 'wss://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
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
update
Update the bot with new options. This also refreshes the local data with the response from the server.
Parameters
| Parameter | Default | Description |
|---|---|---|
options | required | Update options (see Update Bot Endpoint for all options) |
Returns
void
Example
await bot.update({
bot_name: 'Updated Bot Name',
scheduled_start_time: new Date(new Date().getTime() + 10 * 60000),
custom_metadata: {
request_id: 'req_456',
customer_id: 'acme-42',
},
});
console.log(bot.data.bot_name); // 'Updated Bot Name'
sendChatMessage
Send a chat message in the name of the bot.
Parameters
| Parameter | Default | Description |
|---|---|---|
message | required | Text 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 bot uses a realtime transcription model, you can use the RealtimeClient to directly connect with the websocket server for live updates and to interact with the bot.
Parameters
| Parameter | Default | Description |
|---|---|---|
without_audio | false | When true, creates a RealtimeClient without audio streaming capabilities, even if the bot was created with realtime_audio: true. When false (default), includes audio streaming if available. |
Throws
Error- If the realtime client is not available
Returns
Example
// Get realtime client with audio streaming (if available)
const realtimeClient = bot.getRealtimeClient();
realtimeClient.on('ts', (segment) => {
console.log(`${segment.speaker_name} said: ${segment.transcript}`);
// Full transcript so far (array of segments)
console.log('Transcript so far:', realtimeClient.transcript);
});
// Listen to audio data
realtimeClient.on('audio', (buffer: Buffer) => {
// buffer is 16-bit PCM audio at 16kHz sample rate
});
await realtimeClient.connect();
// Get realtime client WITHOUT audio streaming
const transcriptOnlyClient = bot.getRealtimeClient(true);
await transcriptOnlyClient.connect();