-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
25 changed files
with
652 additions
and
595 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 |
---|---|---|
|
@@ -15,3 +15,4 @@ lib/instaStory.js | |
lib/jiwa.js | ||
package-lock.json | ||
.env | ||
dist |
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
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
const { color } = require('../utils/color') | ||
|
||
module.exports = { | ||
name: 'add', | ||
aliases: ['ad'], | ||
description: 'Untuk menambahkan orang ke group dengan nomor\nPenggunaan: !add 6285xxxx', | ||
// eslint-disable-next-line no-shadow-restricted-names | ||
execute (client, undefined, pesan, args) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (args.length < 1) return client.reply('Siapa yang mau lu add ?, demit ?') | ||
if (args[0].startsWith('08')) return client.reply('Jaman sudah canggih!!, masa masih pakai 0 awalannya') | ||
try { | ||
num = `${args[0].replace(/ /g, '')}@s.whatsapp.net` | ||
client.groupAdd(client.from, [num]) | ||
} catch (e) { | ||
console.log('Error : %s', color(e, 'red')) | ||
client.reply('Gagal menambahkan target, mungkin karena di private') | ||
} | ||
} | ||
} | ||
export {} | ||
const { color } = require('../utils/color') | ||
|
||
module.exports = { | ||
name: 'add', | ||
aliases: ['ad'], | ||
description: 'Untuk menambahkan orang ke group dengan nomor\nPenggunaan: !add 6285xxxx', | ||
execute (client: any, chat: any, pesan: any, args:any) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (args.length < 1) return client.reply('Siapa yang mau lu add ?, demit ?') | ||
if (args[0].startsWith('08')) return client.reply('Jaman sudah canggih!!, masa masih pakai 0 awalannya') | ||
try { | ||
const num = `${args[0].replace(/ /g, '')}@s.whatsapp.net` | ||
client.groupAdd(client.from, [num]) | ||
} catch (e) { | ||
console.log('Error : %s', color(e, 'red')) | ||
client.reply('Gagal menambahkan target, mungkin karena di private') | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
module.exports = { | ||
name: 'clearall', | ||
aliases: ['ca'], | ||
description: 'Untuk benghapus semua chat _only owner_', | ||
execute (client, chat, pesan) { | ||
if (!isOwner) return reply('Kamu siapa?') | ||
chatAll = client.chats.all() | ||
client.setMaxListeners(25) | ||
for (const chat of chatAll) { | ||
client.deleteChat(chat.jid) | ||
} | ||
client.reply('Berhasil menghapus semua chat') | ||
} | ||
} | ||
module.exports = { | ||
name: 'clearall', | ||
aliases: ['ca'], | ||
description: 'Untuk benghapus semua chat _only owner_', | ||
execute (client, chat, pesan) { | ||
if (!client.isOwner) return client.reply('Kamu siapa?') | ||
const chatAll = client.chats.all() | ||
client.setMaxListeners(25) | ||
for (const chat of chatAll) { | ||
client.deleteChat(chat.jid) | ||
} | ||
client.reply('Berhasil menghapus semua chat') | ||
} | ||
} |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
module.exports = { | ||
name: 'demote', | ||
aliases: ['dm'], | ||
description: 'Untuk manghapus admin anggota group\nPenggunaan: !demote _tag_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (chat.message.extendedTextMessage === undefined || chat.message.extendedTextMessage === null) return client.reply('Tag target yang ingin di demote!') | ||
mentioned = chat.message.extendedTextMessage.contextInfo.mentionedJid | ||
if (mentioned.length > 1) { | ||
teks = 'Perintah di terima, demote :\n' | ||
for (const _ of mentioned) { | ||
teks += `@${_.split('@')[0]}\n` | ||
} | ||
client.mentions(teks, mentioned, true) | ||
client.groupDemoteAdmin(client.from, mentioned) | ||
} else { | ||
client.mentions(`Perintah di terima, menghapus admin : @${mentioned[0].split('@')[0]} di group`, mentioned, true) | ||
client.groupDemoteAdmin(client.from, mentioned) | ||
} | ||
} | ||
} | ||
module.exports = { | ||
name: 'demote', | ||
aliases: ['dm'], | ||
description: 'Untuk manghapus admin anggota group\nPenggunaan: !demote _tag_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (chat.message.extendedTextMessage === undefined || chat.message.extendedTextMessage === null) return client.reply('Tag target yang ingin di demote!') | ||
const mentioned = chat.message.extendedTextMessage.contextInfo.mentionedJid | ||
if (mentioned.length > 1) { | ||
let teks = 'Perintah di terima, demote :\n' | ||
for (const _ of mentioned) { | ||
teks += `@${_.split('@')[0]}\n` | ||
} | ||
client.mentions(teks, mentioned, true) | ||
client.groupDemoteAdmin(client.from, mentioned) | ||
} else { | ||
client.mentions(`Perintah di terima, menghapus admin : @${mentioned[0].split('@')[0]} di group`, mentioned, true) | ||
client.groupDemoteAdmin(client.from, mentioned) | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
module.exports = { | ||
name: 'help', | ||
aliases: ['h'], | ||
description: 'Menampilkan semua perintah dan deskripsi', | ||
execute (client, chat, pesan, args) { | ||
const commands = client.cmd.array() | ||
if (args.length == 0) { | ||
let text = 'Daftar perintah di bot ini\n\nPrefix: !\n' | ||
commands.forEach((cmd) => { | ||
text += `- *${cmd.name}* ${cmd.aliases ? `(${cmd.aliases})` : ''}\n` | ||
}) | ||
text += '\nMasih bingung? ketik *!help <perintah>* akan menampilkan penggunaan perintah tersebut' | ||
return client.reply(text) | ||
} else { | ||
if (!client.cmd.has(args[0])) return client.reply('Perintah yang anda maksut tidak ada bro') | ||
const text = client.cmd.get(args[0]).description | ||
return client.reply(text) | ||
} | ||
} | ||
} | ||
module.exports = { | ||
name: 'help', | ||
aliases: ['h'], | ||
description: 'Menampilkan semua perintah dan deskripsi', | ||
execute (client, chat, pesan, args) { | ||
const commands = client.cmd.array() | ||
if (args.length == 0) { | ||
let text = 'Daftar perintah di bot ini\n\nPrefix: !\n' | ||
commands.forEach((cmd) => { | ||
text += `- *${cmd.name}* ${cmd.aliases ? `(${cmd.aliases})` : ''}\n` | ||
}) | ||
text += '\nMasih bingung? ketik *!help <perintah>* akan menampilkan penggunaan perintah tersebut' | ||
return client.reply(text) | ||
} else { | ||
if (!client.cmd.has(args[0])) return client.reply('Perintah yang anda maksut tidak ada bro') | ||
const text = client.cmd.get(args[0]).description | ||
return client.reply(text) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
module.exports = { | ||
name: 'hidetag', | ||
aliases: ['ht'], | ||
description: 'Untuk mengetag semua orang tanpa @\nPenggunaan !hidetag _text_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
const value = client.body.slice(9) | ||
const memberList = [] | ||
for (const member of client.groupMembers) { | ||
memberList.push(member.jid) | ||
} | ||
const options = { | ||
text: value, | ||
contextInfo: { mentionedJid: memberList }, | ||
quoted: chat | ||
} | ||
client.sendMess(client.from, options) | ||
} | ||
} | ||
module.exports = { | ||
name: 'hidetag', | ||
aliases: ['ht'], | ||
description: 'Untuk mengetag semua orang tanpa @\nPenggunaan !hidetag _text_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
const value = client.body.slice(9) | ||
const memberList = [] | ||
for (const member of client.groupMembers) { | ||
memberList.push(member.jid) | ||
} | ||
const options = { | ||
text: value, | ||
contextInfo: { mentionedJid: memberList }, | ||
quoted: chat | ||
} | ||
client.sendMess(client.from, options) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
module.exports = { | ||
name: 'kick', | ||
aliases: ['k'], | ||
description: 'Untuk mengeluarkan angota di group\nPenggunaan: !kick _tag_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (chat.message.extendedTextMessage === undefined || chat.message.extendedTextMessage === null) return client.reply('Tag target yang ingin di tendang!') | ||
mentioned = chat.message.extendedTextMessage.contextInfo.mentionedJid | ||
if (mentioned.length > 1) { | ||
teks = 'Perintah di terima, mengeluarkan :\n' | ||
for (const _ of mentioned) { | ||
teks += `@${_.split('@')[0]}\n` | ||
} | ||
client.mentions(teks, mentioned, true) | ||
client.groupRemove(client.from, mentioned) | ||
} else { | ||
client.mentions(`Perintah di terima, mengeluarkan : @${mentioned[0].split('@')[0]}`, mentioned, true) | ||
client.groupRemove(client.from, mentioned) | ||
} | ||
} | ||
} | ||
module.exports = { | ||
name: 'kick', | ||
aliases: ['k'], | ||
description: 'Untuk mengeluarkan angota di group\nPenggunaan: !kick _tag_', | ||
execute (client, chat, pesan) { | ||
if (!client.isGroup) return client.reply(pesan.error.group) | ||
if (!client.isGroupAdmins) return client.reply(pesan.hanya.admin) | ||
if (!client.isBotGroupAdmins) return client.reply(pesan.hanya.botAdmin) | ||
if (chat.message.extendedTextMessage === undefined || chat.message.extendedTextMessage === null) return client.reply('Tag target yang ingin di tendang!') | ||
const mentioned = chat.message.extendedTextMessage.contextInfo.mentionedJid | ||
if (mentioned.length > 1) { | ||
let teks = 'Perintah di terima, mengeluarkan :\n' | ||
for (const _ of mentioned) { | ||
teks += `@${_.split('@')[0]}\n` | ||
} | ||
client.mentions(teks, mentioned, true) | ||
client.groupRemove(client.from, mentioned) | ||
} else { | ||
client.mentions(`Perintah di terima, mengeluarkan : @${mentioned[0].split('@')[0]}`, mentioned, true) | ||
client.groupRemove(client.from, mentioned) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export {} | ||
const { databaseView, databaseInput } = require('../utils/db') | ||
|
||
module.exports = { | ||
|
Oops, something went wrong.