UNPKG

@vonage/messages

Version:

Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS

46 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessengerAudio = void 0; const AbstractAudioMessage_1 = require("../AbstractAudioMessage"); /** * Represents an audio message for the Messenger channel. * * @group Messenger */ class MessengerAudio extends AbstractAudioMessage_1.AbstractAudioMessage { /** * The channel for this message (always 'messenger'). */ channel; /** * The messenger information for this message. */ messenger; /** * Sends an audio message to the Facebook Messenger channel. * * @param {MessengerAudioParams} params - The parameters for creating a Messenger audio message. * @example * ```ts * import { MessengerAudio } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new MessengerAudio({ * to: TO_NUMBER, * from: FROM_NUMBER, * audio: { * url: 'https://example.com/audio.mp3', * }, * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params) { super(params); this.messenger = params.messenger; this.channel = 'messenger'; } } exports.MessengerAudio = MessengerAudio; //# sourceMappingURL=MessengerAudio.js.map