API-XX commited on
Commit
75c645f
Β·
verified Β·
1 Parent(s): a332a68

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +8 -8
case.js CHANGED
@@ -3634,19 +3634,19 @@ case 'tt': {
3634
  if (!q) return reply("❌ Please provide a TikTok link.");
3635
 
3636
  await loading();
3637
- let apiUrl = `https://api-xx-xi.hf.space/api/tkdl?url=${encodeURIComponent(q)}`;
3638
 
3639
  try {
3640
  let response = await fetch(apiUrl);
3641
  let json = await response.json();
3642
 
3643
- if (!json.success || !json.download_links.no_watermark) {
3644
  return reply("❌ Failed to download the TikTok video. Please check the link and try again.");
3645
  }
3646
 
3647
  await conn.sendMessage(m.chat, {
3648
- video: { url: json.download_links.no_watermark },
3649
- caption: fontx(`🎡 *TikTok Video Downloaded!*\n\nπŸ“ *Description:* ${json.description}\n> ${caption}`)
3650
  }, { quoted: m });
3651
 
3652
  } catch (error) {
@@ -3660,21 +3660,21 @@ case 'ttaud': {
3660
  if (!q) return reply("❌ Please provide a TikTok link.");
3661
 
3662
  await loading();
3663
- let apiUrl = `https://api-xx-xi.hf.space/api/tkdl?url=${encodeURIComponent(q)}`;
3664
 
3665
  try {
3666
  let response = await fetch(apiUrl);
3667
  let json = await response.json();
3668
 
3669
- if (!json.success || !json.download_links.mp3) {
3670
  return reply("❌ Failed to download the TikTok audio. Please check the link and try again.");
3671
  }
3672
 
3673
  await conn.sendMessage(m.chat, {
3674
- audio: { url: json.download_links.mp3 },
3675
  mimetype: 'audio/mpeg',
3676
  fileName: `tiktok_audio.mp3`,
3677
- caption: fontx(`🎢 *TikTok Audio Downloaded!*\n\nπŸ“ *Description:* ${json.description}\n> ${caption}`)
3678
  }, { quoted: m });
3679
 
3680
  } catch (error) {
 
3634
  if (!q) return reply("❌ Please provide a TikTok link.");
3635
 
3636
  await loading();
3637
+ let apiUrl = `https://apis.davidcyriltech.my.id/download/tiktok?url=${encodeURIComponent(q)}`;
3638
 
3639
  try {
3640
  let response = await fetch(apiUrl);
3641
  let json = await response.json();
3642
 
3643
+ if (!json.success || !json.result.video) {
3644
  return reply("❌ Failed to download the TikTok video. Please check the link and try again.");
3645
  }
3646
 
3647
  await conn.sendMessage(m.chat, {
3648
+ video: { url: json.result.video },
3649
+ caption: fontx(`🎡 *TikTok Video Downloaded!*\n\nπŸ‘€ *Creator:* ${json.result.author.nickname}\n❀️ *Likes:* ${json.result.statistics.likeCount}\nπŸ’¬ *Comments:* ${json.result.statistics.commentCount}\nπŸ”„ *Shares:* ${json.result.statistics.shareCount}\n\nπŸ“ *Description:* ${json.result.desc}`)
3650
  }, { quoted: m });
3651
 
3652
  } catch (error) {
 
3660
  if (!q) return reply("❌ Please provide a TikTok link.");
3661
 
3662
  await loading();
3663
+ let apiUrl = `https://apis.davidcyriltech.my.id/download/tiktok?url=${encodeURIComponent(q)}`;
3664
 
3665
  try {
3666
  let response = await fetch(apiUrl);
3667
  let json = await response.json();
3668
 
3669
+ if (!json.success || !json.result.music) {
3670
  return reply("❌ Failed to download the TikTok audio. Please check the link and try again.");
3671
  }
3672
 
3673
  await conn.sendMessage(m.chat, {
3674
+ audio: { url: json.result.music },
3675
  mimetype: 'audio/mpeg',
3676
  fileName: `tiktok_audio.mp3`,
3677
+ caption: fontx(`🎢 *TikTok Audio Downloaded!*\n\nπŸ‘€ *Creator:* ${json.result.author.nickname}\n❀️ *Likes:* ${json.result.statistics.likeCount}\nπŸ’¬ *Comments:* ${json.result.statistics.commentCount}\nπŸ”„ *Shares:* ${json.result.statistics.shareCount}\n\nπŸ“ *Description:* ${json.result.desc}`)
3678
  }, { quoted: m });
3679
 
3680
  } catch (error) {