Created
January 1, 2026 06:23
-
-
Save ONLym22/1bae974ecda1c998e7aebfc07bda594d to your computer and use it in GitHub Desktop.
Uploaded via ONLym Bot
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
| // 📂 Source: JavaScript | |
| case "gemini": | |
| case "gemini-flash": | |
| { | |
| if (!text && !quoted) return xreply(`Contoh:\n${p_c}${command} Tanggal berapa hari ini?\n\nAtau kirim/reply file dengan caption ${p_c}${command} analisis file ini`); | |
| let q = quoted ? quoted : m; | |
| let mime = (q.msg || q).mimetype || ""; | |
| let catBoxUrl = ""; | |
| if (mime) { | |
| xreact(); | |
| let media = await vellia.downloadAndSaveMediaMessage(q); | |
| catBoxUrl = await uploadCatBox(media); | |
| } | |
| let apiUrl = `https://onlym.my.id/ai/gemini-flash?text=${Enc(text || "analisis file ini")}&apikey=${global.onlym}`; | |
| if (catBoxUrl) { | |
| apiUrl += `&url=${Enc(catBoxUrl)}`; | |
| } | |
| apiUrl += `&gemini_key=${global.geminiToken}`; | |
| let res = await fetchJson(apiUrl); | |
| if (!res.status) return xreply("Gagal mendapatkan respon AI"); | |
| xreply(res.result); | |
| } | |
| break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment