Skip to content

Instantly share code, notes, and snippets.

@FarXyz-ID
Created June 28, 2025 16:15
Show Gist options
  • Save FarXyz-ID/f8f756ca75c2a768d06a2a91883b4176 to your computer and use it in GitHub Desktop.
Save FarXyz-ID/f8f756ca75c2a768d06a2a91883b4176 to your computer and use it in GitHub Desktop.
Created By VarShade Prikitiw
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