• Delete a message

    Parameters

    • chatId: string | WAJS.whatsapp.Wid
    • ids: string | string[]
    • OptionaldeleteMediaInDevice: boolean
    • Optionalrevoke: boolean

    Returns Promise<DeleteMessageReturn | DeleteMessageReturn[]>

    // Delete a message
    WPP.chat.deleteMessage('[number]@c.us', 'msgid');
    // Delete a list of messages
    WPP.chat.deleteMessage('[number]@c.us', ['msgid1', 'msgid2]);
    // Delete a message and delete media
    WPP.chat.deleteMessage('[number]@c.us', 'msgid', true);
    // Revoke a message
    WPP.chat.deleteMessage('[number]@c.us', 'msgid', true, true);