Skip to content

Commit

Permalink
add clearall
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 18, 2021
1 parent 276ac13 commit c096011
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions command/clearall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { MessageType } = require('@adiwajshing/baileys')

module.exports = {
name: 'clearall',
aliases: ['ca'],
description: 'Untuk benghapus semua chat _only owner_',
execute (client, chat, pesan) {
if (!client.isGroup) return client.reply(pesan.error.group)
if (!isOwner) return reply('Kamu siapa?')
chatAll = client.chats.all()
client.setMaxListeners(25)
for (let chat of chatAll) {
client.deleteChat(chat.jid)
}
client.reply('Berhasil menghapus semua chat')
}
}

0 comments on commit c096011

Please sign in to comment.