Skip to content
This repository was archived by the owner on Oct 27, 2024. It is now read-only.

Commit 6e8b6fd

Browse files
fixed stalk tiktok & tiktok audio
1 parent aaffee2 commit 6e8b6fd

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

HandleMsg.js

+30-12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const loliwrap = new lolis()
1111
const { getSFWImage, getNSFWImage } = require('waifu.pics-wrapper')
1212
const speed = require('performance-now')
1313
const fetch = require('node-fetch')
14+
const { TTScraper } = require('tiktok-scraper-ts')
15+
const stalkuy = new TTScraper()
1416
const ytdown = require('ytdl-core')
1517
const readline = require('readline')
1618
const chalk = require('chalk')
@@ -3469,7 +3471,11 @@ module.exports = HandleMsg = async (urbae, message) => {
34693471
break
34703472
case prefix + 'asupan':
34713473
urbae.reply(from, mess.wait, id)
3472-
await urbae.sendFileFromUrl(from, `https://dapuhy-api.herokuapp.com/api/asupan/asupan?apikey=${dapuhyapi}`, 'vid.mp4', '', id)
3474+
urbae.sendFileFromUrl(from, 'https://api.akuari.my.id/asupan/62', '', '', id)
3475+
.catch(err => {
3476+
console.log(err)
3477+
urbae.reply(from, err.message, id)
3478+
})
34733479
break
34743480
/*case prefix+'ranal':
34753481
urbae.reply(from, mess.wait, id)
@@ -4816,16 +4822,25 @@ module.exports = HandleMsg = async (urbae, message) => {
48164822
})
48174823
})
48184824
break
4819-
/*case prefix + 'stalktiktok':
4825+
case prefix + 'stalktiktok':
48204826
case prefix + 'stalktik':
48214827
case prefix + 'stalktt':
48224828
if (args.length == 0) return urbae.reply(from, `Untuk men-stalk akun Tiktok seseorang\nUsage ${prefix}stalktiktok [username]\ncontoh : ${prefix}stalktiktok @itsandani`, id)
48234829
urbae.reply(from, mess.wait, id)
4824-
scrape.ttUser(q)
4825-
.then(res => {
4826-
console.log(res)
4830+
stalkuy.user(q)
4831+
.then(User => {
4832+
console.log(User)
4833+
urbae.sendFileFromUrl(from, User.avatar, '', `*- Username:* ${User.uniqueId}\n*- Nickname:* ${User.nickname}\n*- Followers:* ${User.followers}\n*- Following:* ${User.following}\n*- Verified:* ${User.verified}\n*- Private:* ${User.privateAccount}\n*- Total Likes:* ${User.hearts}\n*- Total Videos:* ${User.videos}\n*- Created At:* ${User.createdAt}\n*- Bio:* ${User.signature}\n*- Bio Url:* ${User.bioLink}`, id)
4834+
.catch(err => {
4835+
console.log(err)
4836+
urbae.reply(from, err.message, id)
4837+
})
48274838
})
4828-
break*/ //NANTI DIBENERIN
4839+
.catch(err => {
4840+
console.log(err)
4841+
urbae.reply(from, err.message, id)
4842+
})
4843+
break
48294844
case prefix + 'rtiktok':
48304845
case prefix + 'randomtiktok':
48314846
if (q.length == 0) return urbae.reply(from, 'nyari random video apa?', id)
@@ -6907,17 +6922,20 @@ _Desc di update oleh : @${chat.groupMetadata.descOwner.replace('@c.us', '')} pad
69076922
break
69086923
case prefix + 'tiktokaudio':
69096924
if (args.length == 0) return urbae.reply(from, `Fitur untuk mengkonversi Video menjadi Audio!\nKirim perintah ${prefix}tiktokaudio link tiktok`, id)
6910-
const linktk = body.slice(13)
69116925
urbae.reply(from, mess.wait, id)
6912-
axios.get(`http://docs-jojo.herokuapp.com/api/tiktok_audio?url=${linktk}`)
6913-
.then(async (res) => {
6914-
await urbae.sendFileFromUrl(from, res.data.result, '', '', id)
6915-
.catch(() => {
6916-
urbae.reply(from, 'error', id)
6926+
stalkuy.getMusic(q)
6927+
.then(res => {
6928+
urbae.sendFileFromUrl(from, res.coverLarge, '', `*- Title:* ${res.title}\n*- Author:* ${res.author}\n*- Duration:* ${res.duration}\n*- Original:* ${res.original}\n*- Album:* ${res.album}`, id)
6929+
.then(() => {
6930+
urbae.sendFileFromUrl(from, res.playURL, '', '', id)
6931+
.catch((err) => {
6932+
urbae.reply(from, err.message, id)
69176933
})
6934+
})
69186935
})
69196936
.catch((err) => {
69206937
console.log(err)
6938+
urbae.reply(from, err.message, id)
69216939
})
69226940
break
69236941
case prefix + 'math':

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"rzkyfdlh-api": "^0.3.2",
6262
"sharp": "0.28.3",
6363
"stream": "0.0.2",
64+
"tiktok-scraper-ts": "^1.2.2",
6465
"translatte": "^3.0.1",
6566
"waifu.pics-wrapper": "^1.0.0",
6667
"xfarr-api": "^1.0.3",

0 commit comments

Comments
 (0)