Created
June 28, 2025 16:15
-
-
Save FarXyz-ID/f8f756ca75c2a768d06a2a91883b4176 to your computer and use it in GitHub Desktop.
Created By VarShade Prikitiw
This file contains hidden or 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
case 'phub': | |
case 'phsearch': { | |
if (!text) return reply(`π Kirim kata kunci pencarian! | |
Contoh: ${prefix + command} loli`); | |
try { | |
const res = await fetch(`https://api.fasturl.link/sfwnsfw/pornhub/search?name=${encodeURIComponent(text)}`); | |
const json = await res.json(); | |
if (!json.result || json.result.length === 0) return cpe('β Tidak ditemukan hasil.'); | |
const selected = json.result.slice(0, 10); | |
const cards = await Promise.all(selected.map(async (v, i) => ({ | |
header: { | |
title: `π ${v.title}`, | |
hasMediaAttachment: true, | |
imageMessage: (await generateWAMessageContent({ image: { url: v.preview } }, { upload: RaidenSG.waUploadToServer })).imageMessage | |
}, | |
body: { | |
text: `πΊ Durasi: ${v.duration} | |
ποΈ Views: ${v.views}` | |
}, | |
footer: { | |
text: `π Klik tombol untuk download langsung` | |
}, | |
nativeFlowMessage: { | |
buttons: [ | |
{ | |
name: 'cta_url', | |
buttonParamsJson: JSON.stringify({ | |
display_text: 'β¬οΈ Download Video', | |
url: v.url | |
}) | |
}, | |
{ | |
name: 'quick_reply', | |
buttonParamsJson: JSON.stringify({ | |
display_text: 'π₯ Kirim Video', | |
id: `.xpdl ${v.url}` | |
}) | |
} | |
] | |
} | |
}))); | |
const carousel = generateWAMessageFromContent(m.chat, { | |
viewOnceMessage: { | |
message: { | |
interactiveMessage: proto.Message.InteractiveMessage.fromObject({ | |
body: { text: `π Hasil pencarian dari: *${text}*` }, | |
footer: { text: `Geser untuk melihat lebih banyak...` }, | |
carouselMessage: { cards } | |
}) | |
} | |
} | |
}, { quoted: nyaw }); | |
await RaidenSG.relayMessage(m.chat, carousel.message, { messageId: carousel.key.id }); | |
} catch (err) { | |
console.error('β Error search ph:', err); | |
cpe('Terjadi kesalahan saat mengambil data.'); | |
} | |
} | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment