Skip to content

Instantly share code, notes, and snippets.

@spark-shadow
Last active September 6, 2022 07:08
Show Gist options
  • Save spark-shadow/3c7fdd2b947bf8fabb9eb0467bb1ac53 to your computer and use it in GitHub Desktop.
Save spark-shadow/3c7fdd2b947bf8fabb9eb0467bb1ac53 to your computer and use it in GitHub Desktop.
const Asena = require("../Utilis/events");
const {MessageType, GroupSettingChange, ChatModification, WAConnectionTest} = require('@adiwajshing/baileys');
const { parsedJid } = require("../Utilis/Misc");
//Coded by Shadow ( dont copy or edit codes without ctedits )
Asena.addCommand({ pattern: 'clear ?(.*)', fromMe: true, desc: "chat clearing cmnd", }, async (message, match) => {
//Coded by Shadow
if(match == ''){
await message.sendMessage('```cleaning chat...```');
await message.client.modifyChat (message.jid, ChatModification.delete);
await message.sendMessage('```🏳 Chat cleared 🏳```');
}else{
match.match(parseJid).map(async jid => {
await message.client.modifyChat (jid, ChatModification.delete);
})
await message.sendMessage('```🏳 Chat cleared 🏳```');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment