const axios = require('axios'); const config = require('../config'); const { cmd, commands } = require('../command'); cmd({ pattern: "githubstalk", desc: "Fetch detailed GitHub user profile including profile picture.", category: "menu", react: "๐Ÿ–ฅ๏ธ", filename: __filename }, async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sender, senderNumber, botNumber2, botNumber, pushname, isMe, isOwner, groupMetadata, groupName, participants, groupAdmins, isBotAdmins, isAdmins, reply }) => { try { const username = args[0]; if (!username) { return reply("Please provide a GitHub username. "); } const apiUrl = `https://api.github.com/users/${username}`; const response = await axios.get(apiUrl); const data = response.data; let userInfo = `๐Ÿ‘ค *Username*: ${data.name || data.login} ๐Ÿ”— *Github Url*:(${data.html_url}) ๐Ÿ“ *Bio*: ${data.bio || 'Not available'} ๐Ÿ™๏ธ *Location*: ${data.location || 'Unknown'} ๐Ÿ“Š *Public Repos*: ${data.public_repos} ๐Ÿ‘ฅ *Followers*: ${data.followers} | Following: ${data.following} ๐Ÿ“… *Created At*: ${new Date(data.created_at).toDateString()} ๐Ÿ”ญ *Public Gists*: ${data.public_gists} > ยฉ แด˜แดแดกแด‡ส€แด‡แด… ส™ส Mส€ Fส€แด€ษดแด‹`; const sentMsg = await conn.sendMessage(from,{image:{url: data.avatar_url },caption: userInfo },{quoted:mek }) } catch (e) { console.log(e); reply(`error: ${e.response ? e.response.data.message : e.message}`); } }); // jawad tech x