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
| async function img2img(prompt, imageUrl) { | |
| const start = await fetch(`https://fgsi.dpdns.org/api/ai/image/img2img?apikey=APIKEY_MU&prompt=${encodeURIComponent(prompt)}&url=${encodeURIComponent(imageUrl)}`).then(r => r.json()) | |
| let result | |
| while (true) { | |
| const poll = await fetch(start.data.pollUrl).then(r => r.json()) | |
| if (!poll.status) throw new Error('Polling gagal') | |
| if (poll.data.status === 'Success') { | |
| result = poll.data.result | |
| break | |
| } |
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
| import { load } from 'cheerio' | |
| function scoreMatch(q, title) { | |
| const query = q.toLowerCase().split(' ') | |
| const text = title.toLowerCase() | |
| let score = 0 | |
| for (let word of query) { | |
| if (text.includes(word)) score++ | |
| } |
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
| import { load } from 'cheerio' | |
| async function scSearch(q) { | |
| const url = 'https://m.soundcloud.com/search?q=' + encodeURIComponent(q) | |
| const res = await fetch(url, { | |
| headers: { | |
| 'user-agent': 'Mozilla/5.0' | |
| } | |
| }) | |
| const html = await res.text() |
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
| async function scdl(url) { | |
| const base = 'https://convertico.com/' | |
| const headers = { | |
| 'accept': '*/*', | |
| 'origin': base, | |
| 'referer': base + 'soundcloud-downloader/', | |
| 'user-agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Mobile Safari/537.36 EdgA/147.0.0.0' | |
| } |
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
| import { Canvas, loadImage, FontLibrary } from 'skia-canvas' | |
| import fs from 'fs' | |
| import path from 'path' | |
| import { execSync } from 'child_process' | |
| const FONT_URL = 'https://raw.githubusercontent.com/uploader762/dat2/main/uploads/ebea8a-1776501237434.ttf' | |
| const FONT_PATH = './Poppins-Bold.ttf' | |
| const BG_URL = 'https://raw.githubusercontent.com/uploader762/dat1/main/uploads/4f8284-1776503052781.jpg' | |
| async function downloadFont(url, pathFile) { |
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
| import * as cheerio from "cheerio" | |
| async function savetwitter(url) { | |
| const body = new URLSearchParams({ | |
| q: url, | |
| lang: "id", | |
| cftoken: "" | |
| }) | |
| const res = await fetch("https://savetwitter.net/api/ajaxSearch", { |
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
| import { load } from "cheerio" | |
| let handler = async (m, { conn, args, command }) => { | |
| try { | |
| if (!args[0]) return m.reply(`*Example :* .${command} Al Fatihah`) | |
| m.reply(global.wait) | |
| const $ = load(await (await fetch("https://islamipedia.id/murottal/")).text()) | |
| const data = $(".surah-item").map((i, el) => ({ | |
| no: parseInt($(el).find("h5").text().split(".")[0]), | |
| surah: ($(el).attr("data-title") || "").toLowerCase(), |
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
| import * as cheerio from "cheerio"; | |
| async function quran(query) { | |
| const slug = query.toLowerCase().replace(/\s+/g, "-"); | |
| const url = `https://quran.nu.or.id/${slug}`; | |
| const res = await fetch(url); | |
| const html = await res.text(); | |
| const $ = cheerio.load(html); |
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
| function hitungMBG(uang) { | |
| const pengeluaranPerHari = 319600000000 | |
| const hargaPorsi = 15000 | |
| const hariFloat = uang / pengeluaranPerHari | |
| const tahun = Math.floor(hariFloat / 365) | |
| const bulan = Math.floor((hariFloat % 365) / 30) | |
| const hari = Math.floor(hariFloat % 30) |
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
| async function Roblox(username) { | |
| const search = await fetch(`https://users.roblox.com/v1/users/search?keyword=${username}&limit=10`) | |
| const searchJson = await search.json() | |
| if (!searchJson.data || !searchJson.data.length) { | |
| return { error: "User tidak ditemukan" } | |
| } | |
| const user = searchJson.data[0] | |
| const userId = user.id |