Created
October 27, 2023 02:07
-
-
Save I-NRL/45149c7a63c9ab8b0456a9ded00b6f1b to your computer and use it in GitHub Desktop.
get or forward captions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { inrl } = require('../lib') | |
inrl( | |
{ | |
pattern: 'caption ?(.*)', | |
fromMe: true, | |
desc: 'copy or add caption to video or image', | |
type: 'whatsapp', | |
}, | |
async (message, match) => { | |
if ((message.reply_message.image || message.reply_message.video) && match) | |
return await message.forwardMessage(message.jid, | |
await message.quoted.download(), | |
{ quoted: message.data, caption: match }, | |
) | |
if (message.reply_message.text) | |
return await message.forwardMessage(message.jid, message.reply_message.text, | |
{ quoted: message.data}) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment