forked from VryptLab/EternityBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepo.js
More file actions
22 lines (20 loc) · 817 Bytes
/
Copy pathrepo.js
File metadata and controls
22 lines (20 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default {
name: "repo",
category: "developer",
command: ["repo", "ghrepo"],
run: async (conn, m) => {
const text = m.text.trim();
if (!text.includes("/")) return m.reply("📁 Contoh: .repo VryptLab/EternityBot");
const res = await fetch(`https://api.github.com/repos/${text}`);
const data = await res.json();
if (data.message) return m.reply("❌ Repo tidak ditemukan.");
const caption = `📦 *${data.full_name}*
🧾 ${data.description || "-"}
⭐ Stars: ${data.stargazers_count}
🍴 Forks: ${data.forks_count}
🧩 Issues: ${data.open_issues_count}
🕒 Updated: ${new Date(data.updated_at).toLocaleString("id-ID")}
🔗 ${data.html_url}`;
await conn.sendMessage(m.chat, { image: { url: data.owner.avatar_url }, caption });
}
}