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

Commit 8186d86

Browse files
ubah dikit
1 parent 44edc87 commit 8186d86

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

HandleMsg.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -5577,8 +5577,8 @@ module.exports = HandleMsg = async (urbae, message) => {
55775577
datpot = searchthis.tracks.items[0]
55785578
artis = []
55795579
datpot.artists.map(s => {
5580-
artis.push({
5581-
name: s.name
5580+
artis.push({
5581+
name: s.name
55825582
})
55835583
})
55845584
return {
@@ -5597,16 +5597,18 @@ module.exports = HandleMsg = async (urbae, message) => {
55975597
} else {
55985598
var hasil2 = res.artists[0].name
55995599
}
5600-
urbae.sendFileFromUrl(from, res.thumb, 'thumb.jpg', `「 *SPOTIFY* 」\n\n*•Title:* ${res.title}\n*•Artists:* ${hasil2}\n*•Release Date:* ${res.releaseDate}\n*•Popularity:* ${res.popularity}\n*•Url:* ${res.url}\n\n${mess.sendfileaudio}`, id)
5600+
urbae.sendFileFromUrl(from, res.thumb, 'thumb.jpg', `「 *SPOTIFY* 」\n\n*• Title:* ${res.title}\n*• Artists:* ${hasil2}\n*• Release Date:* ${res.releaseDate}\n*• Popularity:* ${res.popularity}\n*• Url:* ${res.url}\n\n${mess.sendfileaudio}`, id)
56015601
spotify.downloadTrack(res.url)
56025602
.then(data => {
56035603
const buffaudio = buffeerr(data)
56045604
fs.writeFile(`./temp/audio/${res.title}.mp3`, buffaudio)
5605-
sleep(10000)
5605+
})
5606+
.then(() => {
56065607
urbae.sendFile(from, `./temp/audio/${res.title}.mp3`, '', '', id)
56075608
setTimeout(() => {
56085609
fs.unlinkSync(`./temp/audio/${res.title}.mp3`)
5609-
}, 5000)
5610+
console.log(color(`Success delete file /temp/audio/${res.title}.mp3`, 'magenta'))
5611+
}, 10000)
56105612
})
56115613
})
56125614
.catch(err => {

0 commit comments

Comments
 (0)