File size: 1,562 Bytes
8d8b0ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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