mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
check if song is live
This commit is contained in:
parent
1cdced9c2f
commit
6b6fafd1b8
3 changed files with 11 additions and 5 deletions
12
base/JaBa.js
12
base/JaBa.js
|
@ -64,9 +64,15 @@ class JaBa extends Client {
|
|||
this.player
|
||||
.on("playSong", async (queue, song) => {
|
||||
const m = await queue.textChannel.send(this.translate("music/play:NOW_PLAYING", { songName: song.name }))
|
||||
setTimeout(() => {
|
||||
m.delete();
|
||||
}, song.duration * 1000);
|
||||
if (!song.isLive) {
|
||||
setTimeout(() => {
|
||||
if (!m.deleted) m.delete();
|
||||
}, song.duration * 1000);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (!m.deleted) m.delete();
|
||||
}, 600 * 1000);
|
||||
}
|
||||
})
|
||||
.on("addSong", (queue, song) => queue.textChannel.send(this.translate("music/play:ADDED_QUEUE", { songName: song.name })))
|
||||
.on("addList", (queue, playlist) => queue.textChannel.send(this.translate("music/play:ADDED_QUEUE_COUNT", { songCount: playlist.songs.length })))
|
||||
|
|
|
@ -18,5 +18,5 @@
|
|||
"STOP_EMPTY": "I've just stopped the music as everyone disconnected from the channel.",
|
||||
"RESULTS_CANCEL": "Search cancelled!",
|
||||
"LIVE": "Live",
|
||||
"ERR_OCCURRED": "An error occurred... Code: `{{error}}`"
|
||||
"ERR_OCCURRED": "An error occurred, skipping...\n`{{error}}`"
|
||||
}
|
|
@ -18,5 +18,5 @@
|
|||
"STOP_EMPTY": "Воспроизведение окончено, т.к. все вышли из голосового канала.",
|
||||
"RESULTS_CANCEL": "Поиск отменён!",
|
||||
"LIVE": "Прямая трансляция",
|
||||
"ERR_OCCURRED": "Произошла ошибка... Код ошибки: `{{error}}`"
|
||||
"ERR_OCCURRED": "Произошла ошибка, пропускаю...\n`{{error}}`"
|
||||
}
|
Loading…
Reference in a new issue