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 "getgist": { | |
| if (!text && !m.quoted) return xreply(`Contoh: ${prefix + command} https://gist.github.com/username/id`); | |
| xreact(); | |
| try { | |
| const url = (text || m.quoted.text).trim(); | |
| const apiUrl = `https://onlym.my.id/tools/getgits?url=${encodeURIComponent(url)}`; | |
| const res = await fetch(apiUrl, { | |
| headers: { | |
| "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", |
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 "getgist": { | |
| if (!text && !m.quoted) return xreply(`Contoh: ${prefix + command} https://gist.github.com/username/id`); | |
| xreact(); | |
| try { | |
| const url = text || m.quoted.text; | |
| const apiUrl = `https://onlym.my.id/tools/getgits?url=${encodeURIComponent(url)}`; | |
| const res = await fetch(apiUrl, { | |
| headers: { | |
| "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", | |
| "Accept": "application/json" |
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
| console.log('hello') |
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 "removebg": | |
| case "rb": { | |
| const q = m.quoted ? m.quoted : m; | |
| const mime = (q.msg || q).mimetype || ""; | |
| if (!/image/.test(mime)) { | |
| return xreply(`Kirim atau balas *gambar* dengan perintah *${prefix + command}*`); | |
| } | |
| if (!global.onlym) { |
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
| const axios = require('axios'); | |
| async function searchSong(query) { | |
| const searchUrl = `https://spotdown.org/api/song-details`; | |
| const config = { | |
| params: { | |
| url: query | |
| }, | |
| headers: { |
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 "spotify": | |
| case "spdl": | |
| case "spotifydl": | |
| case "spotifydownload": | |
| { | |
| if (!text) return xreply(`Contoh: ${p_c}${command} https://open.spotify.com/track/...`); | |
| if (!text.includes("open.spotify.com")) return xreply("❌ Harus berupa link Spotify!"); | |
| xreact(); |
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 "onlym": | |
| 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 = ""; |
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 "ping": | |
| case "srvinfo": { | |
| const os = require("os"); | |
| const nou = require("node-os-utils"); | |
| xreact(); | |
| async function getServerInfo() { | |
| try { | |
| const cpus = os.cpus(); | |
| const totalMem = (os.totalmem() / (1024 ** 3)).toFixed(2); |
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
| const { createCanvas, loadImage } = require('canvas'); | |
| async function createServerStatusImage(data) { | |
| const width = 1280; | |
| const height = 720; | |
| const canvas = createCanvas(width, height); | |
| const ctx = canvas.getContext('2d'); | |
| // Load Background | |
| const background = await loadImage('https://files.catbox.moe/7dlq8d.jpg'); |
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 "ongoing": | |
| case "otakudesu": | |
| case "animeongoing": { | |
| xreact(); | |
| try { | |
| const { data } = await axios.get(`https://onlym.my.id/anime/otakudesu/ongoing?apikey=${global.onlym}`); | |
| if (!data.status || !data.result.length) { | |
| return xreply("❌ Data anime tidak ditemukan"); | |
| } |