-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
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); | ||
} | ||
}); |