Skip to content

Instantly share code, notes, and snippets.

@ktz-master
Forked from Abhisirwabotofc/achu
Last active June 14, 2022 17:23
Show Gist options
  • Save ktz-master/5fd73bd623115b015bebb8f5842e2b2e to your computer and use it in GitHub Desktop.
Save ktz-master/5fd73bd623115b015bebb8f5842e2b2e to your computer and use it in GitHub Desktop.
Itz-me
const {
forwardOrBroadCast,
bot,
parsedJid,
getBuffer,
} = require('../lib/')
const vsend = 'https://i.imgur.com/onnS2yY.jpeg'
Shadow.addCommand(
{ pattern: 'itz-me ?(.*)', fromMe: true, desc: "send replied msg as voice msg." },
async (message, match) => {
if (match == "") return await message.sendMessage("*Give me a jid*\nExample .mforward jid1 jid2 jid3 jid4 ...");
if (!message.reply_message)
return await message.sendMessage("*Reply to a Message*");
const buff = await getBuffer(vsend)
let options = {}
options.ptt = true
options.quoted = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net",
remoteJid: "status@broadcast"
},
message: {
"imageMessage": {
"jpegThumbnail": buff.buffer,
"caption": "ɪᴛᴢ-ᴍᴇ ͢ʙᴏᴛ ᴀᴄʜᴜ"
}
}
}
options.contextInfo = {
forwardingScore: 1000,
isForwarded: true
}
}
}
for (let jid of parsedJid(match)) {
await forwardOrBroadCast(jid, message, options);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment