Skip to main content

sendConfirmationRequest

plugin.chat.sendConfirmationRequest(confirmationMessage: string, buttons: string[], withFeedback: boolean): Promise<string>

Sends a confirmation request to the server with two options: Yes or No.

Parameters

ParameterTypeRequiredDescription
confirmationMessagestringYes
buttonsstring[]Yes(default: [])
withFeedbackbooleanYes(default: false)

Returns

Promise<string> — A promise that resolves with the server's response.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.chat.sendConfirmationRequest('confirmationMessage', /* string[] */, true);
console.log(result);