check if live and uploader name

This commit is contained in:
JonnyBro 2021-12-26 00:18:58 +05:00
parent 5565f7e86a
commit a278944a18
3 changed files with 5 additions and 5 deletions

View file

@ -32,8 +32,8 @@ class Np extends Command {
.setAuthor(message.translate("music/queue:TITLE"))
.setThumbnail(track.thumbnail)
.addField(message.translate("music/np:T_TITLE"), track.name + `\n${track.url}`)
.addField(message.translate("music/np:T_CHANNEL"), track.uploader.name)
.addField(message.translate("music/np:T_DURATION"), message.convertTime(Date.now() + track.duration * 1000, "to", true))
.addField(message.translate("music/np:T_CHANNEL"), track.uploader.name ? track.uploader.name : "Отсутствует")
.addField(message.translate("music/np:T_DURATION"), track.isLive ? message.translate("music/play:LIVE") : message.convertTime(Date.now() + track.duration * 1000, "to", true))
.setColor(data.config.embed.color)
.setFooter(data.config.embed.footer)
.setTimestamp();

View file

@ -17,6 +17,6 @@
"STOP_DISCONNECTED": "I've just stopped the music as I have been disconnected from the channel.",
"STOP_EMPTY": "I've just stopped the music as everyone disconnected from the channel.",
"RESULTS_CANCEL": "Search cancelled!",
"LIVE_VIDEO": "Lives are not yet supported!",
"LIVE": "◉ LIVE",
"ERR_OCCURRED": "An error occurred... Code: `{{error}}`"
}

View file

@ -12,11 +12,11 @@
"CANCELLED": "Выбор отменён",
"NOT_PLAYING": "На сервере сейчас ничего не воспроизводится.",
"QUEUE_ENDED": "Очередь окончена.",
"ADDED_QUEUE": "**{songName}}** добавлен в очередь!",
"ADDED_QUEUE": "**{{songName}}** добавлен в очередь!",
"ADDED_QUEUE_COUNT": "**{{songCount}}** трек(а/ов) добавлено в очередь!",
"STOP_DISCONNECTED": "Воспроизведение окончено, т.к. я вышел из голосового канала.",
"STOP_EMPTY": "Воспроизведение окончено, т.к. все вышли из голосового канала.",
"RESULTS_CANCEL": "Поиск отменён!",
"LIVE_VIDEO": "Прямые трансляции не поддерживаются!",
"LIVE": "◉ LIVE",
"ERR_OCCURRED": "Произошла ошибка... Код ошибки: `{{error}}`"
}