This commit is contained in:
NoLogicAlan committed 2026-09-16 02:35:47 +03:00
1 parent 3a72e46775
commit 5558cf8282
9 files changed
+37 -12

No files matched your search

+2 -2
View File
@@ -65,7 +65,7 @@ export async function run(message, data) {
const elapsed = p.getCurrentElapsedDuration();
const total = p.getCurrentDuration();
const link = current.spotifyUrl || current.url || "";
let title = current.title;
let title = current.title ?? "Unknown";
if (title.length > 50) title = title.slice(0, 47) + "...";
const titleFmt = link ? `[${title}](${link})` : title;
@@ -84,7 +84,7 @@ export async function run(message, data) {
const index = String(start + i + 1).padStart(2, " ");
const dur = vid.duration ? p.getDuration(vid.duration) : "?:??";
const link = vid.spotifyUrl || vid.url || "";
let title = vid.title;
let title = vid.title ?? "Unknown";
if (title.length > 45) title = title.slice(0, 42) + "...";
title = link ? `[${title}](${link})` : title;
const upNext = (start + i === 0) ? " ▶" : "";
+13 -1
View File
@@ -243,10 +243,22 @@ export async function run(msg) {
reply = player.pause();
break;
case "stop":
case "stop": {
const hadCurrent = !!player.queue.getCurrent();
player._lastPlayedTrack = player.queue.getCurrent() ?? player._lastPlayedTrack;
player.queue.reset();
player._activeTrackOpt = null;
player._clearTrackEndTimer?.();
player._bridgeStop?.();
player._paused = false;
player._pausedAt = null;
if (hadCurrent) {
player.emit("stopplay");
if (!player._is247Enabled?.()) player._startInactivityTimer?.();
}
reply = this.t(msg, "responses.player.stoppedCleared");
break;
}
case "skip":
reply = player.skip();
+15 -7
View File
@@ -53,8 +53,10 @@ export async function run(msg, data) {
let desc = `📻 **Radio Stations (Page ${page + 1}/${totalPages})**\n\n`;
pickable.forEach((r, i) => {
desc += `${NUMBER_EMOJIS[i]} **${r.detailedName}** (\`${r.name}\`)\n`;
desc += ` ${r.description.replaceAll("\n", "\n ")}\n\n`;
const displayName = r.detailedName ?? r.name ?? "Station";
const stationDesc = String(r.description ?? "").replaceAll("\n", "\n ");
desc += `${NUMBER_EMOJIS[i]} **${displayName}** (\`${r.name ?? "station"}\`)\n`;
desc += ` ${stationDesc}\n\n`;
});
desc += `⬅️ Previous ➡️ Next ❌ Cancel`;
@@ -126,9 +128,9 @@ export async function run(msg, data) {
}
if (input) {
const radio = radios.find(r => r.name.toLowerCase() === input);
const radio = radios.find(r => String(r.name ?? "").toLowerCase() === input);
if (!radio) {
const names = radios.map(r => `\`${r.name}\``).join(", ");
const names = radios.map(r => `\`${r.name ?? "station"}\``).join(", ");
return msg.reply(this.t(msg, "responses.radio.unknownStation", { station: input, stations: names }));
}
return playStation(this, msg, radio);
@@ -157,12 +159,18 @@ async function playStation(ctx, msg, radio, editTarget = null) {
else p.playRadio(radio);
const prefix = ctx.handler.getPrefix(msg?.channel?.channel?.guildId ?? msg?.message?.guildId);
const stationName = radio.detailedName ?? radio.name ?? "Radio Station";
const stationUrl = radio.author?.url ?? "";
const stationDesc = String(radio.description ?? "");
const stationLine = stationUrl
? `**[${stationName}](${stationUrl})**\n\n`
: `**${stationName}**\n\n`;
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setTitle(`📻 ${radio.detailedName}`)
.setTitle(`📻 ${stationName}`)
.setDescription(
`**[${radio.detailedName}](${radio.author.url})**\n\n` +
`${radio.description}\n\n` +
stationLine +
`${stationDesc}\n\n` +
`_Use \`${prefix}skip\` to stop the radio, or \`${prefix}radio list\` to switch stations._`
)
;
+2 -2
View File
@@ -590,12 +590,12 @@ const PlayerLifecycleMixin = {
return player;
} catch (retryErr) {
logger.warn(`[PlayerManager] Retry also failed for channel ${cleanChannelId}: ${retryErr.message}`);
errorMsg = this._t(message, "responses.join.joinFailedGeneric");
errorMsg = this._t(message, "responses._common.joinFailedGeneric");
}
} else if (errCode === "PERMISSION") {
errorMsg = this._t(message, "responses.join.joinFailedPerms", { channel: cleanChannelId });
} else if (errCode === "NOT_FOUND") {
errorMsg = this._t(message, "responses.join.joinFailedNotFound");
errorMsg = this._t(message, "responses._common.joinFailedNotFound");
} else if (errCode === "TIMEOUT") {
errorMsg = this._t(message, "responses.join.joinFailed");
} else {
+1
View File
@@ -199,6 +199,7 @@
"responses": {
"_common": {
"nothingPlaying": "❌ لا يوجد شيء يعمل حالياً!",
"serverOnlyForMusic": "🎵 الموسيقى تحتاج إلى **قناة صوتية داخل سيرفر** — لا أستطيع الانضمام إلى الصوت في الرسائل الخاصة. استخدم الأمر داخل سيرفر بدلاً من ذلك!",
"noVoiceChannel": "⚠️ يرجى الانضمام إلى قناة صوتية أولاً.",
"noVoiceStrict": "⚠️ يجب عليك الانضمام إلى قناة صوتية لاستخدام هذا الأمر.",
"alreadyInChannel": "⚠️ أنا أعزف بالفعل في {{channels}}. انضم إلى تلك القناة أو استخدم `{{prefix}}play` لبدء الموسيقى في قناتك.",
+1
View File
@@ -199,6 +199,7 @@
"responses": {
"_common": {
"nothingPlaying": "❌ هیچ شتێک پەخش ناکرێت لە ئێستادا!",
"serverOnlyForMusic": "🎵 مۆسیقا پێویستی بە **کەناڵێکی دەنگی لە سێرڤەردا** هەیە — ناتوانم لە پەیامە تایبەتەکاندا بێتە دەنگەوە. فەرمانەکە لە سێرڤەردا بەکاربهێنە!",
"noVoiceChannel": "⚠️ تکایە سەرەتا بەشداری کەناڵێکی دەنگی بکە.",
"noVoiceStrict": "⚠️ پێویستە سەرەتا بەشداری کەناڵێکی دەنگی بکەیت بۆ بەکارهێنانی ئەم فەرمانە.",
"alreadyInChannel": "⚠️ من پێشتر لە {{channels}} پەخش دەکەم. بەشداری ئەو کەناڵە بکە یان `{{prefix}}play` بەکاربهێنە بۆ دەستپێکردنی موزیک لە کەناڵەکەت.",
+1
View File
@@ -199,6 +199,7 @@
"responses": {
"_common": {
"nothingPlaying": "❌ Es wird gerade nichts abgespielt!",
"serverOnlyForMusic": "🎵 Musik braucht einen **Sprachkanal in einem Server** — ich kann mich nicht mit Sprachchat in DMs verbinden. Führe den Befehl stattdessen in einem Server aus!",
"noVoiceChannel": "⚠️ Bitte trete zuerst einem Sprachkanal bei.",
"noVoiceStrict": "⚠️ Du musst einem Sprachkanal beitreten, um diesen Befehl zu nutzen.",
"alreadyInChannel": "⚠️ Ich spiele bereits in {{channels}}. Trete diesem Kanal bei oder nutze `{{prefix}}play`, um Musik in deinem Kanal zu starten.",
+1
View File
@@ -199,6 +199,7 @@
"responses": {
"_common": {
"nothingPlaying": "❌ Não está tocando nada no momento!",
"serverOnlyForMusic": "🎵 Música precisa de um **canal de voz em um servidor** — não consigo entrar em voz nas DMs. Use o comando em um servidor!",
"noVoiceChannel": "⚠️ Por favor, entre em um canal de voz primeiro.",
"noVoiceStrict": "⚠️ Você precisa entrar em um canal de voz para usar este comando.",
"alreadyInChannel": "⚠️ Já estou tocando em {{channels}}. Entre nesse canal ou use `{{prefix}}play` para começar a tocar no seu canal.",
+1
View File
@@ -199,6 +199,7 @@
"responses": {
"_common": {
"nothingPlaying": "❌ Şu anda çalan bir şey yok!",
"serverOnlyForMusic": "🎵 Müzik için bir **sunucudaki ses kanalı** gerekiyor — DM'lerde sesli kanala katılamam. Komutu bunun yerine bir sunucuda kullan!",
"noVoiceChannel": "⚠️ Lütfen önce bir ses kanalına katılın.",
"noVoiceStrict": "⚠️ Bu komutu kullanmak için bir ses kanalına katılmanız gerekiyor.",
"alreadyInChannel": "⚠️ Zaten {{channels}} kanalında çalıyorum. O kanala katılın veya kendi kanalınızda müzik başlatmak için `{{prefix}}play` kullanın.",