OnSentArgs: {
    Whatsapp: InstanceType<typeof WhatsAppAPI>;
    held_for_quality_assessment?: boolean;
    id?: string;
    message: ClientMessage;
    offload: typeof offload;
    phoneID: string;
    request: ClientMessageRequest;
    response?: ServerMessageResponse;
    to: string;
    type: string;
}

Type declaration

  • Whatsapp: InstanceType<typeof WhatsAppAPI>

    The WhatsAppAPI instance that emitted the event

  • Optionalheld_for_quality_assessment?: boolean

    If true, the message send was delayed until quality can be validated and it will either be sent or dropped at this point. Undefined if parsed is set to false or the message_status property is not present in the response.

  • Optionalid?: string

    The message id, undefined if parsed is set to false

  • message: ClientMessage

    The message object

  • offload: typeof offload

    Utility function for offloading code from the main thread, useful for long running tasks such as AI generation

  • phoneID: string

    The bot's phoneID from where the message was sent

  • request: ClientMessageRequest

    The object sent to the server

  • Optionalresponse?: ServerMessageResponse

    The parsed response from the server, undefined if parsed is set to false

  • to: string

    The user's phone number

  • type: string

    The message type