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: "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",
});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 nowUpdate the bot with new options. This also refreshes the local data with the response from the server.
| Parameter | Default | Description |
|---|---|---|
options | required | Update options (see Update Bot Endpoint for all options) |
void
await bot.update({
bot_name: "Updated Bot Name",
scheduled_start_time: new Date(new Date().getTime() + 10 * 60000),
});
console.log(bot.data.bot_name); // 'Updated Bot Name'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 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.
| 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. |
Error- If the realtime client is not available
// Get realtime client with audio streaming (if available)
const realtimeClient = bot.getRealtimeClient();
realtimeClient.on("ts", (data) => {
console.log(`${data.speaker_name} said: ${data.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();