Hi! thanks for sharing this, Could you please tell me where to replace this snippet or is there any full script to this? Appreciate the help.This is a script snippet for sending messages using the method message will disappear after 24 hours.
You can use this function to send certain messages. I'll give you the complete script..
this is just an example..JavaScript:const sendMessageDisappear = async (token, number, message) => { const WA_DEFAULT_EPHEMERAL = 86400; // for 24 hours in seconds try { const sendingMessage = sock[token].sendMessage(number, message, { ephemeralExpiration: WA_DEFAULT_EPHEMERAL }); console.log(sendingMessage); return sendingMessage; } catch (error) { console.log(error); return false; } };