Kembali ke Beranda
Gistify Snippet
Feb 16·1 file(s)
Public
Uploaded by Joy MD - Bot | 16/2/2026, 15.41.06
synced from github gist Ceramah Ustadz Abdul Somad
#api
Ceramah Ustadz Abdul Somadplaintext
103 baris| 1 | /* |
| 2 | * ─────────────────────────── |
| 3 | * 🟢 JOY MD - SOURCE CODE |
| 4 | * ─────────────────────────── |
| 5 | * 👤 Channel : https://shorturl.at/ce5eX |
| 6 | * 📅 Fetched : 16/2/2026, 15.38.57 |
| 7 | * 📂 File : ceramah_uas.js |
| 8 | * ─────────────────────────── |
| 9 | */ |
| 10 | |
| 11 | /** |
| 12 | * @module plugins/download/ceramah_uas |
| 13 | * @description Random Ceramah Ustad Abdul Somad (via TikWM Search) |
| 14 | */ |
| 15 | |
| 16 | import axios from 'axios' |
| 17 | |
| 18 | async function ttSearch(query) { |
| 19 | let response = await axios('https://tikwm.com/api/feed/search', { |
| 20 | method: 'POST', |
| 21 | data: { |
| 22 | keywords: query, |
| 23 | count: 12, |
| 24 | cursor: 0, |
| 25 | web: 1, |
| 26 | hd: 1 |
| 27 | }, |
| 28 | headers: { |
| 29 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", |
| 30 | "Cookie": "current_langange=en;", |
| 31 | "user-agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36" |
| 32 | } |
| 33 | }) |
| 34 | let date = response.data.data |
| 35 | let video = date.videos |
| 36 | if (video.length === 0) { |
| 37 | throw new Error('Tidak Ada Video Yang Di Temukan!') |
| 38 | } else { |
| 39 | let all = Math.floor(Math.random() * video.length); |
| 40 | return { |
| 41 | status: true, |
| 42 | creator: 'JoyBot', |
| 43 | result: { |
| 44 | video_id: video[all].video_id, |
| 45 | region: video[all].region, |
| 46 | title: video[all].title, |
| 47 | author: video[all].author.unique_id, |
| 48 | nickname: video[all].author.nickname, |
| 49 | profile: 'https://tikwm.com' + video[all].author.avatar, |
| 50 | cover: 'https://tikwm.com' + video[all].cover, |
| 51 | play: 'https://tikwm.com' + video[all].play, |
| 52 | wm_play: 'https://tikwm.com' + video[all].wmplay, |
| 53 | music: 'https://tikwm.com' + video[all].music, |
| 54 | music_info: { |
| 55 | id: video[all].music_info.id, |
| 56 | title: video[all].music_info.title, |
| 57 | play_music: video[all].music_info.play |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | let handler = async (m, { conn, text, usedPrefix, command }) => { |
| 65 | const tiny = (t) => t.split('').map(c=>{ |
| 66 | const m={"a":"ᴀ","b":"ʙ","c":"ᴄ","d":"ᴅ","e":"ᴇ","f":"ꜰ","g":"ɢ","h":"ʜ","i":"ɪ","j":"ᴊ","k":"ᴋ","l":"ʟ","m":"ᴍ","n":"ɴ","o":"ᴏ","p":"ᴘ","q":"ǫ","r":"ʀ","s":"s","t":"ᴛ","u":"ᴜ","v":"ᴠ","w":"ᴡ","x":"x","y":"ʏ","z":"ᴢ"}; |
| 67 | return m[c]||c |
| 68 | }).join('') |
| 69 | |
| 70 | await conn.sendMessage(m.chat, { react: { text: '🕌', key: m.key } }) |
| 71 | |
| 72 | try { |
| 73 | const response = await ttSearch('ceramah ustad abdul somad') |
| 74 | const { result } = response |
| 75 | |
| 76 | if (result) { |
| 77 | let { title, author, play } = result |
| 78 | |
| 79 | let caption = `╭───「 *${tiny('CERAMAH UAS')}* 」───\n` |
| 80 | caption += `│\n` |
| 81 | caption += `│ 👳 Ustadz Abdul Somad\n` |
| 82 | caption += `│ 👤 Creator: ${author}\n` |
| 83 | caption += `│\n` |
| 84 | caption += `╰────────────────────\n\n` |
| 85 | caption += `> ${title}` |
| 86 | |
| 87 | await conn.sendMessage(m.chat, { video: { url: play }, caption }, { quoted: m }) |
| 88 | await conn.sendMessage(m.chat, { react: { text: '✅', key: m.key } }) |
| 89 | } else { |
| 90 | m.reply("Video tidak ditemukan.") |
| 91 | } |
| 92 | } catch (e) { |
| 93 | m.reply("❌ Gagal memuat ceramah.") |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | handler.help = ['uas'] |
| 98 | handler.tags = ['Religion Menu'] |
| 99 | handler.command = ['uas', 'ustadabdulsomad', 'ceramahuas'] |
| 100 | handler.prefix = true |
| 101 | |
| 102 | export default handler |
| 103 | |
Diskusi & Komentar0
Belum ada komentar — jadilah yang pertama memberikan masukan atau diskusi kode.
Masuk dengan akun GitHub untuk menulis komentar dan berdiskusi.