Upload case.js
Browse files
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://
|
3638 |
|
3639 |
try {
|
3640 |
let response = await fetch(apiUrl);
|
3641 |
let json = await response.json();
|
3642 |
|
3643 |
-
if (!json.success || !json.
|
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.
|
3649 |
-
caption: fontx(`π΅ *TikTok Video Downloaded!*\n\n
|
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://
|
3664 |
|
3665 |
try {
|
3666 |
let response = await fetch(apiUrl);
|
3667 |
let json = await response.json();
|
3668 |
|
3669 |
-
if (!json.success || !json.
|
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.
|
3675 |
mimetype: 'audio/mpeg',
|
3676 |
fileName: `tiktok_audio.mp3`,
|
3677 |
-
caption: fontx(`πΆ *TikTok Audio Downloaded!*\n\n
|
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) {
|