𝐇𝐚𝐬𝐮𝐦𝐢𝐁𝐨𝐭 𝐅𝐫𝐞𝐞𝐂𝐨𝐝𝐞𝐬
February 14, 2025 at 10:56 AM
/* ౨ৎ ˖ ࣪⊹ 𝐁𝐲 𝐉𝐭𝐱𝐬 𐙚˚.ᡣ𐭩
❀ Canal Principal ≽^•˕• ྀི≼
https://whatsapp.com/channel/0029VaeQcFXEFeXtNMHk0D0n
❀ Canal Rikka Takanashi Bot
https://whatsapp.com/channel/0029VaksDf4I1rcsIO6Rip2X
❀ Canal StarlightsTeam
https://whatsapp.com/channel/0029VaBfsIwGk1FyaqFcK91S
❀ HasumiBot FreeCodes
https://whatsapp.com/channel/0029Vanjyqb2f3ERifCpGT0W
*/
// *𓍯𓂃𓏧♡ UPLOAD - FILES*
import axios from "axios"
import FormData from "form-data"
let HS = async (m, { conn }) => {
if (!m.quoted) return conn.reply(m.chat, `❀ Responde a un archivo`, m)
try {
let media = await m.quoted.download()
let { link } = await anomakiCdn(media, 'HasumiBotFreeCodes')
m.reply(link)
} catch (error) {
console.error(error)
}}
HS.command = ['upload', 'tourl']
export default HS
async function anomakiCdn(buffer, filename) {
try {
const d = new FormData()
d.append("files", buffer, filename)
const headers = { headers: { ...d.getHeaders() }}
let { data: p } = await axios.post("https://cdn.anomaki.web.id/api/upload", d, headers)
let link = "https://cdn.anomaki.web.id" + p[0].url
return { link }
} catch (error) {
console.error("error al subir archivo ", error)
}}
❤️
🏳️🌈
🤮
3