Skip to content

Commit

Permalink
Create fakereply.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingjux authored May 6, 2024
1 parent 3191e62 commit 849e1b9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions plugins/fakereply.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const {
smd,
prefix,
} = require('../lib')

smd({
cmdname: "fakereply",
alias :['freply'],
desc: "Create fake Reply by given texts!",
type: "general",
use:" msg| reply_text | number ",
usage:"generates fake messages of given text and number!",
filename: __filename,
public : true,
},
async (m,text) => {
try {
let types = ["text","order","contact","image" , "video"]
let args = text.split("|")
if(!text || args.length < 3) return await m.reply(`*Use ${prefix}fakereply text |Reply_text|923192173398|type(text,order,contact,image,video)*`)
let reply = args[0],msg = args[1],num = `${args[2].replace(/[^0-9]/g, '')}@s.whatsapp.net` , type = args[3] && types.includes(args[3])? args[3] :"text", charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',smds = 'SMD';
for (let i = 0; i < 13; i++) { smds += charset[Math.floor(Math.random() * charset.length)]; }
let fak =await m.bot.fakeMessage(type,{id: smds,remoteJid:m.isGroup? m.chat : num,participant:num},msg)
try{ if(type === "contact") {fak.message.contactMessage.jpegThumbnail = await m.getpp(num) }}catch(e){console.log(e)}
await m.bot.sendMessage(m.chat,{text : reply}, { quoted : fak})
} catch (e) {
m.error(`${e}\n\nCommand: fakereply`, e, false);
}
});

0 comments on commit 849e1b9

Please sign in to comment.