forked from AyGemuy/Taylor-V2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools-binary.js
More file actions
22 lines (22 loc) · 743 Bytes
/
Copy pathtools-binary.js
File metadata and controls
22 lines (22 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import axios from "axios";
const handler = async (m, {
conn,
text
}) => {
try {
if (!text) return await conn.reply(m.chat, "Masukkan Teksnya", m);
const response = await axios.get(`https://some-random-api.com/binary?text=${text}`);
const hasil = `Teks: ${text}\nBinary: ${response.data?.binary ?? "Tidak ada data binary"}`;
await conn.reply(m.chat, hasil, m);
} catch (error) {
console.error("Error fetching binary data:", error);
await conn.reply(m.chat, "Terjadi kesalahan saat mengambil data binary", m);
}
};
handler.help = ["binary"].map(v => v + " <teks>");
handler.tags = ["tools"];
handler.command = /^(binary)$/i;
handler.owner = false;
handler.exp = 0;
handler.limit = false;
export default handler;