descargas-igstalk.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import fg from 'api-dylux'
  2. function descifrar(cifrado) {
  3. return atob(cifrado);
  4. }
  5. let handler = async (m, { conn, args, usedPrefix, command }) => {
  6. if (!args[0]) throw `⚠️ Ingrese el Username de Instagram\n\n*• Ejemplo:* ${usedPrefix + command} crxs_ofc`
  7. m.react("⌛")
  8. try {
  9. const user = "aHR0cHM6Ly96eWxhbGFicy5jb20vYXBpLzUwNDAvaW5zdGFncmFtK3VzZXIrcHJvZmlsZSthcGkvOTE5OS9wcm9maWxlK2luZm9ybWF0aW9u";
  10. const urlApi = descifrar(user);
  11. const descripcion = "Nzc0OXw4WXlxMEd1YkVmeW9OUkNPVGExTmJNdVZZYUFtUHdJbXdVd2tpamhl";
  12. const res = await fetch(urlApi, {
  13. method: 'POST',
  14. headers: {
  15. 'Authorization': 'Bearer ' + descifrar(descripcion),
  16. 'Content-Type': 'application/json'
  17. },
  18. body: JSON.stringify({ username: args[0] })
  19. })
  20. const json = await res.json()
  21. if (!json.result) return m.react("❌")
  22. const p = json.result
  23. const isPrivate = p.is_private ? 'Sí 🔒' : 'No 🔓'
  24. const biography = p.biography?.trim() || '—'
  25. const fullName = p.full_name || '—'
  26. const followers = p.edge_followed_by.count
  27. const following = p.edge_follow.count
  28. const posts = p.edge_owner_to_timeline_media.count
  29. const picUrl = p.profile_pic_url_hd || p.profile_pic_url
  30. const txt = `
  31. 👤 *Perfil de Instagram*
  32. 🔹 *Username:* ${p.username}
  33. 🔹 *Nombre completo:* ${fullName}
  34. 🔹 *Biografía:* ${biography}
  35. 🔹 *Privada:* ${isPrivate}
  36. 🔹 *Seguidores:* ${followers}
  37. 🔹 *Seguidos:* ${following}
  38. 🔹 *Publicaciones:* ${posts}
  39. 🔹 *Foto de perfil:*`
  40. await conn.sendFile(
  41. m.chat,
  42. picUrl,
  43. 'insta.jpg',
  44. txt,
  45. m
  46. )
  47. m.react("✅")
  48. } catch (err) {
  49. try {
  50. let res2 = await fg.igStalk(args[0])
  51. let te = `👤 *Perfil de Instagram*:
  52. *• Nombre:* ${res2.name}
  53. *• Username:* ${res2.username}
  54. *• Seguidores:* ${res2.followersH}
  55. *• Siguiendo:* ${res2.followingH}
  56. *• Bio:* ${res2.description}
  57. *• Posts:* ${res2.postsH}
  58. *• Link:* https://instagram.com/${res2.username.replace(/^@/, '')}`
  59. await conn.sendFile(m.chat, res2.profilePic, 'igstalk.png', te, m)
  60. m.react("⌛")
  61. } catch (e) {
  62. await m.react("❌")
  63. m.reply(`\`\`\`⚠️ OCURRIÓ UN ERROR ⚠️\`\`\`\n\n> *Reporta con #report*:\n\n>>> ${e}`)
  64. console.log(e)
  65. }
  66. }
  67. }
  68. handler.help = ['igstalk']
  69. handler.tags = ['downloader']
  70. handler.command = ['igstalk','igsearch','instagramsearch']
  71. handler.register = true
  72. handler.limit = 1
  73. export default handler