Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassin994 authored Oct 20, 2024
1 parent 2c8c2ba commit 1118f9f
Showing 1 changed file with 71 additions and 28 deletions.
99 changes: 71 additions & 28 deletions commandes/gitcme.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,72 @@
const {
zokou
} = require("../framework/zokou");
zokou({
'nomCom': 'github',
'reaction': '🍳',
'categorie': "Search"
},
async (_0x52e003, _0x14d9f6, _0x5f1e4d) => {
const _0x3c7f3f = _0x4f7595.join(" ");
if (!_0x3c7f3f) {
return _0x3b1d82("Give me a valid github username like: " + _0x4fdb82 + "github boniphace478");
const { zokou } = require("../framework/zokou");
const axios = require('axios');

//--------
async function githubstalk(user) {
return new Promise((resolve, reject) => {
axios.get('https://api.github.com/users/'+user)
.then(({ data }) => {
let info = {
username: data.login,
name: data.name,
bio: data.bio,
id: data.id,
nodeId: data.node_id,
profile_pic: data.avatar_url,
html_url: data.html_url,
type: data.type,
admin: data.site_admin,
company: data.company,
blog: data.blog,
location: data.location,
email: data.email,
public_repo: data.public_repos,
public_gists: data.public_gists,
followers: data.followers,
following: data.following,
created_at: data.created_at,
updated_at: data.updated_at
};
resolve(info);
});
});
}

zokou(
{
nomCom: 'github',
alias: ['githubstalk'],
categorie: 'gitcme',
reaction: '♻️'
},

async (dest, zk, {ms, arg, repondre}) => {
if (!arg[0]) return await repondre("Username is missing");
try {
const { username, following, followers, type, bio, company, blog, location, email, public_repo, public_gists, profile_pic, created_at, updated_at, html_url, name, id } = await githubstalk(arg.join(' '));
const info = `*── 「 GITHUB USER INFO 」 ──*
🔖 *Nickname :* ${name}
🔖 *Username :* ${username}
🚩 *Id :* ${id}
✨ *Bio :* ${bio}
🏢 *Company :* ${company}
📍 *Location :* ${location}
📧 *Email :* ${email}
📰 *Blog :* ${blog}
🔓 *Public Repos :* ${axios.get(public_repo).then((res) => res.data.map((repo) => !repo.private ? `\n- *${repo.name}* : https://github.com/${repo.full_name}`: null))}
🔐 *Public Gists :* https://gist.github.com/${username}/
💕 *Followers :* ${followers}
👉 *Following :* ${following}
🔄 *Updated At :* ${updated_at}
🧩 *Created At :* ${created_at}
👤 *Profile :* ${html_url}`;
await zk.sendMessage(dest, {
image: {url: profile_pic},
caption: info
}, {quoted: ms});
} catch {
await repondre("something went wrong : check user name");
}
}
const _0x5d3fd3 = await fetch("https://api.github.com/users/" + _0x3c7f3f);
const _0x546dd2 = await _0x5d3fd3.json();
const _0x5892a1 = _0x546dd2.id;
const _0x9d02ae = _0x546dd2.name;
const _0x406595 = _0x546dd2.login;
const _0x3a4d0f = _0x546dd2.bio;
const _0x34623f = _0x546dd2.company;
const _0x5b8e0e = _0x546dd2.location;
const _0x24d738 = _0x546dd2.email;
const _0x3a22e7 = _0x546dd2.blog;
const _0x170599 = _0x546dd2.repos_url;
const _0x1ada1e = _0x546dd2.gists_url;
const _0x1f7a0c = _0x546dd2.followers;
const _0x86d2d1 = _0x546dd2.following;
await _0x3b1d82("\n °GITHUB USER INFO°\n \n🚩 Id : " + _0x5892a1 + "\n🔖 Name : " + _0x9d02ae + "\n🔖 Username : " + _0x406595 + "\n✨ Bio : " + _0x3a4d0f + "\n🏢 Company : " + _0x34623f + "\n📍 Location : " + _0x5b8e0e + "\n📧 Email : " + _0x24d738 + "\n📰 Blog : " + _0x3a22e7 + "\n🔓 Public Repo : " + _0x170599 + "\n🔐 Public Gists : " + _0x1ada1e + "\n👪 Followers : " + _0x1f7a0c + "\n🫶 Following : " + _0x86d2d1);
});
);

0 comments on commit 1118f9f

Please sign in to comment.