-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
1 parent
3b1974b
commit 00996ac
Showing
7 changed files
with
243 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,50 @@ | ||
let fetch = require('node-fetch') | ||
let handler = async (m, { conn, text, participants, usedPrefix, command }) => { | ||
if (!text) throw `_Masukkan nomor!_ \nContoh:\n\n${usedPrefix + command + ' ' + global.owner[0]}` | ||
let _participants = participants.map(user => user.jid) | ||
let users = (await Promise.all( | ||
text.split(',') | ||
.map(v => v.replace(/[^0-9]/g, '')) | ||
.filter(v => v.length > 4 && v.length < 20 && !_participants.includes(v + '@s.whatsapp.net')) | ||
.map(async v => [ | ||
v, | ||
await conn.isOnWhatsApp(v + '@s.whatsapp.net') | ||
]) | ||
)).filter(v => v[1]).map(v => v[0] + '@c.us') | ||
let response = await conn.groupAdd(m.chat, users) | ||
if (response[users] == 408) throw `Nomor tersebut telah keluar baru² ini\nHanya bisa masuk melalui ${usedPrefix}link` | ||
let pp = await conn.getProfilePicture(m.chat).catch(_ => false) | ||
let jpegThumbnail = pp ? await (await fetch(pp)).buffer() : false | ||
for (let user of response.participants.filter(user => Object.values(user)[0].code == 403)) { | ||
let [[jid, { | ||
invite_code, | ||
invite_code_exp | ||
}]] = Object.entries(user) | ||
let teks = `Mengundang @${jid.split('@')[0]} menggunakan invite...` | ||
m.reply(teks, null, { | ||
contextInfo: { | ||
mentionedJid: conn.parseMention(teks) | ||
} | ||
}) | ||
await conn.sendGroupV4Invite(m.chat, jid, invite_code, invite_code_exp, false, 'Invitation to join my WhatsApp group', jpegThumbnail ? { | ||
jpegThumbnail | ||
} : {}) | ||
} | ||
} | ||
handler.help = ['add', '+'].map(v => v + ' nomor,nomor') | ||
handler.tags = ['admin'] | ||
handler.command = /^(add|\+)$/i | ||
handler.owner = false | ||
handler.mods = false | ||
handler.premium = false | ||
handler.group = true | ||
handler.private = false | ||
|
||
handler.admin = true | ||
handler.botAdmin = true | ||
|
||
handler.fail = null | ||
handler.limit = true | ||
|
||
module.exports = handler | ||
|
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,54 @@ | ||
let handler = async (m, { usedPrefix, command, conn, args }) => { | ||
if (!args[0]) throw `Gunakan format: ${usedPrefix}${command} https://www.instagram.com/xxx/xxxx/` | ||
let res = await igdl(args[0]) | ||
if (!res.length) throw 'Not found!' | ||
for (let ress of res) { | ||
let caption = ` | ||
*💻 Url:* ${args[0]} | ||
*🎰 Link:* ${ress.result} | ||
`.trim() | ||
conn.sendFile(m.chat, ress.result, 'ig.mp4', caption, m) | ||
} | ||
} | ||
handler.help = ['ig'].map(v => v + ' <url>') | ||
handler.tags = ['downloader'] | ||
|
||
handler.command = /^(ig(dl)?)$/i | ||
|
||
module.exports = handler | ||
|
||
const fetch = require('node-fetch') | ||
const cheerio = require('cheerio') | ||
const FormData = require('form-data') | ||
async function igdl(url) { | ||
if (!/^((https|http)?:\/\/(?:www\.)?instagram\.com\/(p|tv|reel|stories)\/([^/?#&]+)).*/i.test(url)) throw 'Url invalid' | ||
let form = new FormData() | ||
form.append('url', encodeURI(url)) | ||
form.append('action', 'post') | ||
let res = await fetch('https://snapinsta.app/action.php', { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary1kCNm4346FA9yvCN', | ||
'cookie': 'PHPSESSID=6d7nupv45th6ln9ldhpu62pg8s; _ga=GA1.2.1450546575.1637033620; _gid=GA1.2.1378038975.1637033620; _gat=1; __gads=ID=68a947f8174e0410-22fc6960b3ce005e:T=1637033620:RT=1637033620:S=ALNI_MbXTvxtxuISyAFMevds6-00PecLlw; __atuvc=1%7C46; __atuvs=61932694ba428f79000; __atssc=google%3B1', | ||
'origin': 'https://snapinsta.app', | ||
'referer': 'https://snapinsta.app/id', | ||
'sec-ch-ua': '"Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"', | ||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', | ||
...form.getHeaders() | ||
}, | ||
body: form | ||
}) | ||
let html = await res.text() | ||
const $ = cheerio.load(html) | ||
let results = [] | ||
$('div.col-md-4').each(function () { | ||
let thumbnail = $(this).find('div.download-items > div.download-items__thumb > img').attr('src') | ||
let result = $(this).find('div.download-items > div.download-items__btn > a').attr('href') | ||
if (!/https?:\/\//i.test(result)) result = 'https://snapinsta.app' + result | ||
results.push({ | ||
thumbnail, | ||
result | ||
}) | ||
}) | ||
return results | ||
} |
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,44 @@ | ||
let axios = require("axios"); | ||
let handler = async(m, { conn, text }) => { | ||
|
||
await m.reply('Searching...') | ||
if (!text) return conn.reply(m.chat, 'Masukan Alamat IP yang akan dicek', m) | ||
|
||
axios.get(`https://videfikri.com/api/iplookup/?ip=${text}`).then ((res) => { | ||
|
||
let hasil = ` | ||
*IP CHECKER* | ||
IP : ${res.data.result.ip} | ||
Negara : ${res.data.result.country} | ||
Kode Negara : ${res.data.result.country_code} | ||
Provinsi : ${res.data.result.region_name} | ||
Kode Provinsi : ${res.data.result.region} | ||
Kota : ${res.data.result.city} | ||
Kordinat : | ||
${res.data.result.latitude}, ${res.data.result.longtitude} | ||
Zona Waktu : ${res.data.result.timezone} | ||
ISP : ${res.data.result.isp} | ||
AS : ${res.data.result.as} | ||
`.trim() | ||
|
||
conn.reply(m.chat, hasil, m) | ||
}) | ||
} | ||
handler.help = ['ip', 'ipcheck', 'ipcek'].map(v => v + ' <alamat ip>') | ||
handler.tags = ['tools'] | ||
handler.command = /^(ip|ipcheck|ipcek)$/i | ||
handler.owner = false | ||
handler.mods = false | ||
handler.premium = false | ||
handler.group = false | ||
handler.private = false | ||
|
||
handler.admin = false | ||
handler.botAdmin = false | ||
|
||
handler.fail = null | ||
handler.exp = 0 | ||
handler.limit = false | ||
|
||
module.exports = handler |
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,24 @@ | ||
let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})/i | ||
|
||
let handler = async (m, { conn, text, usedPrefix }) => { | ||
let [_, code] = text.match(linkRegex) || [] | ||
if (!code) throw 'Link Salah' | ||
let res = await conn.acceptInvite(code) | ||
m.reply(`Berhasil join grup ${res.gid}`).then(() => { | ||
var jumlahHari = 86400000 * 0.5 | ||
var now = new Date() * 1 | ||
if (now < global.db.data.chats[res.gid].expired) global.db.data.chats[res.gid].expired += jumlahHari | ||
else global.db.data.chats[res.gid].expired = now + jumlahHari | ||
}) | ||
await conn.sendButton(res.gid, ` | ||
*${conn.user.name}* adalah bot whatsapp yang dibangun dengan Nodejs, *${conn.user.name}* diundang oleh @${m.sender.split`@`[0]} | ||
ketik *${usedPrefix}menu* untuk melihat daftar perintah`.trim(), '© stikerin', 'Menu', `${usedPrefix}?`, m) | ||
} | ||
handler.help = ['join <chat.whatsapp.com>'] | ||
handler.tags = ['tools'] | ||
handler.command = /^join$/i | ||
|
||
handler.premium = false | ||
|
||
module.exports = handler |
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,27 @@ | ||
let handler = async (m, { conn, args }) => { | ||
let id = args && /\d+\-\d+@g.us/.test(args[0]) ? args[0] : m.chat | ||
try { | ||
let online = [...Object.keys(conn.chats.get(id).presences), conn.user.jid] | ||
conn.reply(m.chat, '┌─〔 Daftar Online 〕\n' + online.map(v => '├ @' + v.replace(/@.+/, '')).join`\n` + '\n└────', m, { | ||
contextInfo: { mentionedJid: online } | ||
}) | ||
} catch (e) { | ||
m.reply('') | ||
} | ||
} | ||
handler.help = ['here', 'online'] | ||
handler.tags = ['group'] | ||
handler.command = /^(here|(list)?online)$/i | ||
handler.owner = false | ||
handler.mods = false | ||
handler.premium = false | ||
handler.group = false | ||
handler.private = false | ||
|
||
handler.admin = false | ||
handler.botAdmin = false | ||
|
||
handler.fail = null | ||
|
||
module.exports = handler | ||
|
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,25 @@ | ||
let { spawn } = require('child_process'); | ||
let handler = async (m, { conn }) => { | ||
if (!process.send) throw 'Dont: node main.js\nDo: node index.js' | ||
if (global.conn.user.jid == conn.user.jid) { | ||
await m.reply('Sedang Mereset Bot...\nMohon tunggu sekitar 1 menit') | ||
await global.db.save() | ||
process.send('reset') | ||
} else throw '_eeeeeiiittsssss..._' | ||
} | ||
handler.help = ['restart'] | ||
handler.tags = ['owner'] | ||
handler.command = /^restart$/i | ||
handler.owner = false | ||
handler.mods = true | ||
handler.premium = false | ||
handler.group = false | ||
handler.private = false | ||
|
||
handler.admin = false | ||
handler.botAdmin = false | ||
|
||
handler.fail = null | ||
|
||
module.exports = handler | ||
|
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,19 @@ | ||
const { newMessagesDB } = require("@adiwajshing/baileys") | ||
|
||
let handler = async (m, { conn, text }) => { | ||
if (!text) throw false | ||
let who | ||
if (m.isGroup) who = m.mentionedJid[0] | ||
else who = m.chat | ||
if (!who) throw 'Tag salah satu lah' | ||
txt = text.replace('@' + who.split`@`[0], '').trimStart() | ||
conn.emit('chat-update', { | ||
jid: who, | ||
hasNewMessage: true, | ||
messages: newMessagesDB([conn.cMod(m.chat, m, txt, who)]) | ||
}) | ||
} | ||
handler.command = /^sudo$/ | ||
handler.rowner = true | ||
|
||
module.exports = handler |