descargas-tiktokstalk.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import fg from 'api-dylux'
  2. let handler = async (m, { conn, text, args }) => {
  3. if (!text) throw `✳️ Ingrese el Username de un usuario de TikTok`
  4. m.react("⌛");
  5. try {
  6. const apiUrl = `${apis}/tools/tiktokstalk?q=${encodeURIComponent(args[0])}`;
  7. const apiResponse = await fetch(apiUrl);
  8. const delius = await apiResponse.json();
  9. if (!delius || !delius.result || !delius.result.users) return m.react("❌");
  10. const profile = delius.result.users;
  11. const stats = delius.result.stats;
  12. const txt = `👤 *Perfil de TikTok*:
  13. *• Nombre de usuario*: ${profile.username}
  14. *• Nickname*: ${profile.nickname}
  15. *• Verificado*: ${profile.verified ? 'Sí' : 'No'}
  16. *• Seguidores*: ${stats.followerCount.toLocaleString()}
  17. *• Seguidos*: ${stats.followingCount.toLocaleString()}
  18. *• Likes Totales*: ${stats.heartCount.toLocaleString()}
  19. *• Videos*: ${stats.videoCount.toLocaleString()}
  20. *• Firma*: ${profile.signature}
  21. *• URL*:
  22. ${profile.url}`;
  23. await conn.sendFile(m.chat, profile.avatarLarger, 'tt.png', txt, m, null, fake);
  24. m.react("✅");
  25. } catch (e2) {
  26. try {
  27. let res = await fg.ttStalk(args[0])
  28. let txt = `👤 *Perfil de TikTok*:
  29. *• Nombre:* ${res.name}
  30. *• Username:* ${res.username}
  31. *• Seguidores:* ${res.followers}
  32. *• Siguiendo:* ${res.following}
  33. *• Desc:* ${res.desc}
  34. *• Link* : https://tiktok.com/${res.username}`
  35. await conn.sendFile(m.chat, res.profile, 'tt.png', txt, m, null, fake)
  36. m.react("✅");
  37. } catch (e) {
  38. await m.react(`❌`)
  39. m.reply(`\`\`\`⚠️ OCURRIO UN ERROR ⚠️\`\`\`\n\n> *Reporta el siguiente error a mi creador con el comando:*#report\n\n>>> ${e} <<<< `)
  40. console.log(e)
  41. }}}
  42. handler.help = ['tiktokstalk']
  43. handler.tags = ['downloader']
  44. handler.command = /^t(tstalk|iktokstalk|iktoksearch|tsearch)$/i
  45. handler.register = true
  46. handler.limit = 1
  47. export default handler