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: 'https://example.com',
meeting_url: 'https://example.com',
webhook_url: 'https://example.com',
custom_metadata: {
request_id: 'req_123',
customer_id: 'acme-42',
},
recording_url: 'https://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: 'soniox/latest',
transcription_model_key: 'soniox/stt-async-v5',
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.transcript);
console.log(bot.data.participants);
console.log(bot.data.recording_url);
console.log(bot.data.transcription_model);
console.log(bot.data.transcription_model_key);
// ...
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
getPricing
Fetch pricing data for this bot.
Returns
MeetingBotPricingData
Example
const pricing = await bot.getPricing();
console.log(pricing.total.rate_per_hour);
console.log(pricing.total.amount); // null while in progress, number when finished
This method maps to the Get Bot Pricing Endpoint.
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: 'Jamie from Acme',
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); // 'Jamie from Acme'
// Or force a scheduled bot to join immediately by clearing the schedule:
await bot.update({
scheduled_start_time: null,
});
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, waiting_to_record, recording, leaving, 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 or the Realtime features addon (realtime_audio: true), you can use the RealtimeClient to connect to the WebSocket server for live updates and bot actions.
Parameters
| Parameter | Default | Description |
|---|---|---|
without_audio | false | When true, omits the audio connection. When false (default), includes it when 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();