Last active
September 6, 2022 07:08
-
-
Save spark-shadow/3c7fdd2b947bf8fabb9eb0467bb1ac53 to your computer and use it in GitHub Desktop.
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 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