mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-19 08:53:47 +05:00
add highwatermark
This commit is contained in:
parent
47636c898d
commit
d3bc25dcb1
6 changed files with 14 additions and 8 deletions
|
@ -48,7 +48,8 @@ class JaBaClient extends Client {
|
|||
await this.player.extractors.register(YoutubeiExtractor, {
|
||||
authentication: this.config.youtubeCookie,
|
||||
streamOptions: {
|
||||
useClient: "YTMUSIC_ANDROID",
|
||||
useClient: "IOS",
|
||||
highWaterMark: 2 * 1024 * 1024, // 2MB, default is 512 KB (512 * 1024)
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -62,7 +63,10 @@ class JaBaClient extends Client {
|
|||
this.player.events.on("playerStart", async (queue, track) => {
|
||||
const m = (
|
||||
await queue.metadata.channel.send({
|
||||
content: this.translate("music/play:NOW_PLAYING", { songName: `${track.title} - ${track.author}` }, queue.metadata.data.guild.language),
|
||||
content: this.translate("music/play:NOW_PLAYING", {
|
||||
songName: `${track.title} - ${track.author}`,
|
||||
songURL: track.url,
|
||||
}, queue.metadata.data.guild.language),
|
||||
})
|
||||
).id;
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ class PlayContext extends BaseCommand {
|
|||
interaction.editReply({
|
||||
content: interaction.translate("music/play:ADDED_QUEUE", {
|
||||
songName: searchResult.hasPlaylist() ? searchResult.playlist.title : searchResult.tracks[0].title,
|
||||
songURL: searchResult.hasPlaylist() ? searchResult.playlist.url : searchResult.tracks[0].url,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ class Play extends BaseCommand {
|
|||
interaction.editReply({
|
||||
content: interaction.translate("music/play:ADDED_QUEUE", {
|
||||
songName: searchResult.hasPlaylist() ? searchResult.playlist.title : `${searchResult.tracks[0].title} - ${searchResult.tracks[0].author}`,
|
||||
songURL: searchResult.hasPlaylist() ? searchResult.playlist.url : searchResult.tracks[0].url,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
"NO_VOICE_CHANNEL": "You must be in a voice channel",
|
||||
"VOICE_CHANNEL_CONNECT": "I cannot connect to your voice channel",
|
||||
"NO_RESULT": "No results found for `{{query}}`",
|
||||
"NOW_PLAYING": "Now playing **{{songName}}**",
|
||||
"NOW_PLAYING": "Now playing [{{songName}}](<{{songURL}}>)",
|
||||
"NOT_PLAYING": "Nothing is currently playing on the server",
|
||||
"QUEUE_ENDED": "The queue has ended",
|
||||
"ADDED_QUEUE": "**{{songName}}** has been added to the queue",
|
||||
"ADDED_QUEUE": "[{{songName}}](<{{songURL}}>) has been added to the queue",
|
||||
"STOP_DISCONNECTED": "Playback stopped because I left the voice channel",
|
||||
"STOP_EMPTY": "Playback stopped because everyone has left the voice channel",
|
||||
"ERR_OCCURRED": "An error occurred, skipping track..."
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
"NO_VOICE_CHANNEL": "Вы должны находиться в голосовом канале",
|
||||
"VOICE_CHANNEL_CONNECT": "Я не могу присоедениться к вашему голосовому каналу",
|
||||
"NO_RESULT": "По запросу `{{query}}` ничего не найдено",
|
||||
"NOW_PLAYING": "Сейчас играет **{{songName}}**",
|
||||
"NOW_PLAYING": "Сейчас играет [{{songName}}](<{{songURL}}>)",
|
||||
"NOT_PLAYING": "На сервере сейчас ничего не воспроизводится",
|
||||
"QUEUE_ENDED": "Очередь окончена",
|
||||
"ADDED_QUEUE": "**{{songName}}** добавлен в очередь",
|
||||
"ADDED_QUEUE": "[{{songName}}](<{{songURL}}>) добавлен в очередь",
|
||||
"STOP_DISCONNECTED": "Воспроизведение окончено, т.к. я вышел из голосового канала",
|
||||
"STOP_EMPTY": "Воспроизведение окончено, т.к. все вышли из голосового канала",
|
||||
"ERR_OCCURRED": "Произошла ошибка, пропускаю трек..."
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
"NO_VOICE_CHANNEL": "Ви повинні знаходитися в голосовому каналі",
|
||||
"VOICE_CHANNEL_CONNECT": "Я не можу приєднатися до вашого голосового каналу",
|
||||
"NO_RESULT": "За запитом `{{query}}` нічого не знайдено",
|
||||
"NOW_PLAYING": "Зараз грає **{{songName}}**",
|
||||
"NOW_PLAYING": "Зараз грає [{{songName}}](<{{songURL}}>)",
|
||||
"NOT_PLAYING": "На сервері зараз нічого не відтворюється",
|
||||
"QUEUE_ENDED": "Черга закінчена",
|
||||
"ADDED_QUEUE": "**{{songName}}** додано до черги",
|
||||
"ADDED_QUEUE": "[{{songName}}](<{{songURL}}>) додано до черги",
|
||||
"STOP_DISCONNECTED": "Відтворення закінчено, тому що я вийшов з голосового каналу",
|
||||
"STOP_EMPTY": "Відтворення закінчено, тому що всі вийшли з голосового каналу",
|
||||
"ERR_OCCURRED": "Відбулася помилка, пропускаю трек..."
|
||||
|
|
Loading…
Reference in a new issue