feat(ui): overhaul queue and playback embeds with brand color #e9196c and full locales

- Redesign %np, Added-to-Queue, and Auto-Announcement embeds with rich 3-column layouts
- Standardize all embeds to brand color #e9196c
- Transform Queue-Ended announcement with quick-action suggestions (%radio, %autoplay)
- Unify message forwarder in commands/play to support rich EmbedBuilder payloads
- Add native localization keys across all 6 supported locales (en, ar-SA, tr, de-DE, pt-BR, ckb)
This commit is contained in:
NoLogicAlan committed 2026-10-25 02:50:40 +03:00
1 parent af2c725b54
commit 53e3a7e4de
11 files changed
+408 -96

No files matched your search

+3 -3
View File
@@ -33,14 +33,14 @@ export async function run(msg) {
try { try {
const data = await p.nowPlaying(); const data = await p.nowPlaying();
if (!data?.msg) { if (!data?.msg && !data?.embed) {
loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {}); loadingMsg.edit({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses._common.nothingPlaying"))] }).catch(() => {});
return; return;
} }
const embed = new EmbedBuilder() const embed = data.embed || new EmbedBuilder()
.setColor(getGlobalColor()) .setColor(getGlobalColor())
.setDescription(data.msg); .setDescription(data.msg);
if (data.image) embed.setThumbnail(data.image); if (!data.embed && data.image) embed.setThumbnail(data.image);
loadingMsg.edit({ embeds: [embed] }).catch(() => {}); loadingMsg.edit({ embeds: [embed] }).catch(() => {});
} catch (e) { } catch (e) {
+30 -33
View File
@@ -196,6 +196,30 @@ export const command = new CommandBuilder()
, true) , true)
.addAlias("p"); .addAlias("p");
/**
* Forward a play status message or rich embed to the status message.
* @param {string|object|EmbedBuilder} d
* @param {object|null} statusMsg
* @param {object} message
*/
function forwardPlayMessage(d, statusMsg, message) {
let embed;
if (d instanceof EmbedBuilder) {
embed = d;
} else if (d?.embeds?.[0]) {
embed = d.embeds[0];
} else if (typeof d === "object" && d?.embed) {
embed = d.embed;
} else {
embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(String(d?.msg || d));
}
if (statusMsg) {
statusMsg.edit({ embeds: [embed] }).catch(() => {});
} else {
message.reply({ embeds: [embed] }).catch(() => {});
}
}
/** /**
* Run handler for the play command. * Run handler for the play command.
* Handles URL detection, Last.fm integration, provider selection, and track searching. * Handles URL detection, Last.fm integration, provider selection, and track searching.
@@ -221,11 +245,7 @@ export async function run(message, data) {
try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); } try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
const messages = p.playExternal(rawQuery); const messages = p.playExternal(rawQuery);
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) { statusMsg.edit({ embeds: [embed] }).catch(() => {}); }
else { message.reply({ embeds: [embed] }).catch(() => {}); }
});
return; return;
} }
@@ -240,11 +260,7 @@ export async function run(message, data) {
try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); } try { statusMsg = await message.reply({ embeds: [statusEmbed] }); } catch(e) { logger.warn("[Play] Error:", e?.message); }
const messages = p.playExternal(rawQuery, null, null, false, "stream"); const messages = p.playExternal(rawQuery, null, null, false, "stream");
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) { statusMsg.edit({ embeds: [embed] }).catch(() => {}); }
else { message.reply({ embeds: [embed] }).catch(() => {}); }
});
return; return;
} }
@@ -273,11 +289,7 @@ export async function run(message, data) {
const playQuery = `${parsed.track} ${parsed.artist}`.trim(); const playQuery = `${parsed.track} ${parsed.artist}`.trim();
const messages = p.play(playQuery, false, provider === "lastfm" || provider === "lf" ? "yt" : provider, lastfmTrackMeta); const messages = p.play(playQuery, false, provider === "lastfm" || provider === "lf" ? "yt" : provider, lastfmTrackMeta);
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) { statusMsg.edit({ embeds: [embed] }).catch(() => {}); }
else { message.reply({ embeds: [embed] }).catch(() => {}); }
});
return; return;
} }
@@ -294,11 +306,7 @@ export async function run(message, data) {
const playQuery = parsed.artist; const playQuery = parsed.artist;
const messages = p.play(playQuery, false, provider === "lastfm" || provider === "lf" ? "yt" : provider, { requester }); const messages = p.play(playQuery, false, provider === "lastfm" || provider === "lf" ? "yt" : provider, { requester });
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) { statusMsg.edit({ embeds: [embed] }).catch(() => {}); }
else { message.reply({ embeds: [embed] }).catch(() => {}); }
});
return; return;
} }
} }
@@ -395,11 +403,7 @@ export async function run(message, data) {
const playQuery = `${searchResult.name} ${searchResult.artist}`.trim(); const playQuery = `${searchResult.name} ${searchResult.artist}`.trim();
const messages = p.play(playQuery, false, playProvider, lastfmTrackMeta); const messages = p.play(playQuery, false, playProvider, lastfmTrackMeta);
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) { statusMsg.edit({ embeds: [embed] }).catch(() => {}); }
else { message.reply({ embeds: [embed] }).catch(() => {}); }
});
return; return;
} }
} }
@@ -438,12 +442,5 @@ export async function run(message, data) {
: query; : query;
const messages = p.play(playQuery, false, resolvedProvider, lastfmTrackMeta); const messages = p.play(playQuery, false, resolvedProvider, lastfmTrackMeta);
messages.on("message", d => { messages.on("message", d => forwardPlayMessage(d, statusMsg, message));
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(d);
if (statusMsg) {
statusMsg.edit({ embeds: [embed] }).catch(() => {});
} else {
message.reply({ embeds: [embed] }).catch(() => {});
}
});
} }
+208 -52
View File
@@ -170,7 +170,7 @@ const DisplayMixin = {
*/ */
async nowPlaying() { async nowPlaying() {
const current = this.queue.getCurrent(); const current = this.queue.getCurrent();
if (!current) return { msg: "There's nothing playing at the moment." }; if (!current) return { msg: "There's nothing playing at the moment.", embed: null };
const loopqueue = this.queue.loop ? "🔄" : "⏹️"; const loopqueue = this.queue.loop ? "🔄" : "⏹️";
const songloop = this.queue.songLoop ? "🔂" : "⏹️"; const songloop = this.queue.songLoop ? "🔂" : "⏹️";
@@ -179,45 +179,107 @@ const DisplayMixin = {
const vcLine = this._channelId ? `🔊 <#${this._channelId}>\n` : ""; const vcLine = this._channelId ? `🔊 <#${this._channelId}>\n` : "";
let sourceName = "Music";
let sourceIcon = "🎵";
const sourceColor = 0xe9196c;
if (current.type === "radio") {
sourceName = "24/7 Radio";
sourceIcon = "📻";
} else if (current.spotifyUrl || current.type === "spotify") {
sourceName = "Spotify";
sourceIcon = "🟢";
} else if (current.type === "soundcloud" || current.url?.includes("soundcloud.com")) {
sourceName = "SoundCloud";
sourceIcon = "🟠";
} else if (current.type === "youtube" || current.url?.includes("youtube.com") || current.url?.includes("youtu.be")) {
sourceName = "YouTube";
sourceIcon = "▶️";
}
const trackUrl = current.spotifyUrl || current.url || null;
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
const artistName = rawAuthor || "Unknown";
const loopState = this.queue.songLoop ? "🔂 Song" : this.queue.loop ? "🔄 Queue" : "Off";
const nextTrack = this.queue.data?.[0]?.title ? Utils.truncate(this.queue.data[0].title, 35) : "End of queue";
const queueCount = this.queue.size();
const queueRemaining = this.getQueueRemainingTime();
let textMsg = "";
let radioLiveTitle = null;
if (current.type === "radio") { if (current.type === "radio") {
try { try {
const data = await meta(current.url); const data = await meta(current.url);
return { radioLiveTitle = data?.title || null;
msg: `${vcLine}📻 **[${current.title}](${current.author?.url || current.url})**\n${current.description || ""}\n\n🎵 Now playing: ${data?.title || "Unknown"}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`, textMsg = `${vcLine}📻 **[${current.title}](${current.author?.url || current.url})**\n${current.description || ""}\n\n🎵 Now playing: ${radioLiveTitle || "Unknown"}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`;
image: current.thumbnail
};
} catch (e) { } catch (e) {
logger.warn("[Player] Error:", e?.message); logger.warn("[Player] Error:", e?.message);
return { textMsg = `${vcLine}📻 **[${current.title}](${current.author?.url || current.url})**\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`;
msg: `${vcLine}📻 **[${current.title}](${current.author?.url || current.url})**\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`,
image: current.thumbnail
};
} }
} } else if (current.type === "external" || current.type === "stream") {
if (current.type === "external" || current.type === "stream") {
const totalMs = this._getTrackDurationMs(current); const totalMs = this._getTrackDurationMs(current);
let progressLine = ""; const progressLine = totalMs > 0 ? `\n${this._createProgressBar(20)}` : "";
textMsg = `${vcLine}🎵 **[${current.title}](${current.url})** by ${artistName}${progressLine}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`;
if (totalMs > 0) { } else {
progressLine = `\n${this._createProgressBar(20)}`; const progressBar = this._createProgressBar(20);
let trackOptLine = "";
if (this._activeTrackOpt) {
const optStart = Utils.prettifyMS(this._activeTrackOpt.startMs);
const optEnd = this._activeTrackOpt.endMs > 0 ? Utils.prettifyMS(this._activeTrackOpt.endMs) : "end";
trackOptLine = `\n✂️ Custom: ${optStart} → ${optEnd}`;
} }
return { textMsg = `${vcLine}🎵 **[${current.title}](${trackUrl || current.url})**\n${progressBar}${trackOptLine}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`;
msg: `${vcLine}🎵 **[${current.title}](${current.url})** by ${current.artist || "Unknown"}${progressLine}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`,
image: current.thumbnail
};
} }
const progressBar = this._createProgressBar(20); const embed = new EmbedBuilder()
let trackOptLine = ""; .setColor(sourceColor)
if (this._activeTrackOpt) { .setAuthor({
const optStart = Utils.prettifyMS(this._activeTrackOpt.startMs); name: `${sourceIcon} Now Playing • ${sourceName}`,
const optEnd = this._activeTrackOpt.endMs > 0 ? Utils.prettifyMS(this._activeTrackOpt.endMs) : "end"; url: trackUrl || undefined,
trackOptLine = `\n✂️ Custom: ${optStart} → ${optEnd}`; })
.setTitle(Utils.truncate(current.title || "Unknown Track", 250))
.setURL(trackUrl || undefined);
if (current.thumbnail) {
embed.setThumbnail(current.thumbnail);
} }
if (current.type === "radio") {
let desc = current.description ? `${current.description}\n\n` : "";
desc += `🎵 **Live Broadcast:** ${radioLiveTitle || "Live Stream"}`;
embed.setDescription(desc);
embed.addFields(
{ name: "📻 Station", value: Utils.truncate(current.title, 40), inline: true },
{ name: "🎧 Channel", value: this._channelId ? `<#${this._channelId}>` : "None", inline: true },
{ name: "🔊 Volume", value: vol, inline: true }
);
} else {
let desc = `${this._createProgressBar(20)}`;
if (this._activeTrackOpt) {
const optStart = Utils.prettifyMS(this._activeTrackOpt.startMs);
const optEnd = this._activeTrackOpt.endMs > 0 ? Utils.prettifyMS(this._activeTrackOpt.endMs) : "end";
desc += `\n✂️ Custom Cut: \`${optStart} → ${optEnd}\``;
}
embed.setDescription(desc);
embed.addFields(
{ name: "👤 Artist", value: Utils.truncate(artistName, 40), inline: true },
{ name: "🎧 Channel", value: this._channelId ? `<#${this._channelId}>` : "None", inline: true },
{ name: "⚙️ Mode / Vol", value: `${loopState} • ${vol}`, inline: true }
);
}
const footerText = queueCount > 0
? `Queue: ${queueCount} ${queueCount === 1 ? "track" : "tracks"} (${queueRemaining}) • Next: ${nextTrack}`
: `Queue: Empty • Autoplay: ${this._autoplay ? "On" : "Off"}`;
embed.setFooter({ text: footerText });
if (typeof embed.setTimestamp === "function") embed.setTimestamp();
return { return {
msg: `${vcLine}🎵 **[${current.title}](${current.spotifyUrl || current.url})**\n${progressBar}${trackOptLine}\n\n🔉 ${vol} │ ${loopqueue} Queue │ ${songloop} Song │ ${autoplay} Autoplay`, msg: textMsg,
image: current.thumbnail image: current.thumbnail,
embed
}; };
}, },
@@ -256,6 +318,79 @@ const DisplayMixin = {
return this.getDuration(current.duration); return this.getDuration(current.duration);
}, },
/**
* Build a rich localized Added-to-Queue embed.
* @this {import('./Player.mjs').Player}
* @param {object} video - The queued track object.
* @param {boolean} [top=false] - Whether added to the top of queue.
* @param {string} [requester=null] - User ID who queued the track.
* @returns {EmbedBuilder}
*/
buildAddedToQueueEmbed(video, top = false, requester = null) {
const rawAuthor = video.artist || (typeof video.author === "object" ? video.author?.name : video.author);
const author = rawAuthor || "Unknown";
const trackUrl = video.spotifyUrl || video.url || null;
const durationStr = this.getDuration(video.duration);
const queueCount = this.queue.size();
let position = top ? 1 : queueCount;
if (position <= 0) position = 1;
let waitMs = 0;
const current = this.queue.getCurrent();
if (current?.duration && this.startedPlaying) {
const curTotal = this._getTrackDurationMs(current);
let elapsed = Date.now() - this.startedPlaying;
if (this._paused && this._pausedAt) {
elapsed = this._pausedAt - this.startedPlaying;
}
waitMs += Math.max(0, curTotal - elapsed);
}
const upToIndex = top ? 0 : Math.max(0, this.queue.data.length - 1);
for (let i = 0; i < upToIndex; i++) {
waitMs += this._getTrackDurationMs(this.queue.data[i]);
}
const waitStr = waitMs < 60_000
? this._t("responses.play.estimatedWaitLessMinute")
: this._t("responses.play.estimatedWaitMinutes", { minutes: Math.max(1, Math.round(waitMs / 60_000)) });
const posStr = position === 1
? this._t("responses.play.positionNext")
: this._t("responses.play.positionValue", { position });
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({
name: `➕ ${this._t("responses.play.addedToQueue")}`,
url: trackUrl || undefined
})
.setTitle(Utils.truncate(video.title || "Unknown Track", 250))
.setURL(trackUrl || undefined);
if (video.thumbnail) {
embed.setThumbnail(video.thumbnail);
}
embed.setDescription(`${this._t("responses.play.byAuthor", { author })}`);
embed.addFields(
{ name: this._t("responses.play.position"), value: posStr, inline: true },
{ name: this._t("responses.play.duration"), value: durationStr, inline: true },
{ name: this._t("responses.play.estimatedWait"), value: waitStr, inline: true }
);
const userReq = requester || video.requester || null;
const reqText = userReq ? `${this._t("responses.play.requestedBy", { user: `<@${userReq}>` })} • ` : "";
const pluralStr = queueCount === 1 ? this._t("responses.play.trackSingle") : this._t("responses.play.trackPlural");
embed.setFooter({
text: `${reqText}${this._t("responses.play.queueCount", { count: queueCount, plural: pluralStr })}`
});
if (typeof embed.setTimestamp === "function") embed.setTimestamp();
return embed;
},
/** /**
* Emit a now-playing announcement for the given track. * Emit a now-playing announcement for the given track.
* @this {import('./Player.mjs').Player} * @this {import('./Player.mjs').Player}
@@ -265,33 +400,54 @@ const DisplayMixin = {
if (!s) return; if (!s) return;
if (this._destroyed || this.leaving || (!this._voiceConn && !this.connection)) return; if (this._destroyed || this.leaving || (!this._voiceConn && !this.connection)) return;
const prefix = this._getPrefix?.(this._guildId) ?? "%";
if (s.type === "radio") { if (s.type === "radio") {
this.emit("message", { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this._t("responses.radio.nowPlaying", { const embed = new EmbedBuilder()
title: Utils.escapeMarkdown(s.title), .setColor(0xe9196c)
author: s.author?.name || "Unknown", .setAuthor({ name: `📻 ${this._t("responses.play.autoNowPlaying")}` })
url: s.author?.url || s.url || "", .setTitle(Utils.truncate(s.title || "24/7 Radio", 250))
channel: this._channelId || "", .setURL(s.author?.url || s.url || undefined)
}))] }); .setDescription(`🎵 **${s.description || "Live Broadcast"}**\n\n🔊 <#${this._channelId}>`)
return; .setFooter({ text: this._t("responses.play.controlsHint", { prefix }) });
} if (s.thumbnail) embed.setThumbnail(s.thumbnail);
const author = s.artists this.emit("message", { embeds: [embed] });
? s.artists.map(a => a.url ? `[${a.name}](${a.url})` : a.name).join(" & ")
: s.author?.url
? `[${s.author.name}](${s.author.url})`
: s.author?.name || null;
if (!author && (s.type === "external" || s.type === "stream")) {
const desc = "🎵 Now playing [" + Utils.escapeMarkdown(s.title) + "](" + (s.url || "") + ") in <#" + (this._channelId || "") + ">";
this.emit("message", { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] });
return; return;
} }
this.emit("message", { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this._t("responses.play.nowPlaying", { const rawAuthor = s.artist || (typeof s.author === "object" ? s.author?.name : s.author);
title: Utils.escapeMarkdown(s.title), const author = rawAuthor || "Unknown";
url: s.spotifyUrl || s.url, const trackUrl = s.spotifyUrl || s.url || null;
author: author || "Unknown", const durationStr = this.getDuration(s.duration);
channel: this._channelId || "", const nextTrack = this.queue.data?.[0]?.title ? Utils.truncate(this.queue.data[0].title, 35) : null;
}))] });
const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({
name: `🟢 ${this._t("responses.play.autoNowPlaying")}`,
url: trackUrl || undefined
})
.setTitle(Utils.truncate(s.title || "Unknown Track", 250))
.setURL(trackUrl || undefined);
if (s.thumbnail) {
embed.setThumbnail(s.thumbnail);
}
let desc = `${this._t("responses.play.byAuthor", { author })} • \`${durationStr}\``;
if (this._channelId) {
desc += `\n🔊 <#${this._channelId}>`;
}
embed.setDescription(desc);
const footerParts = [];
if (nextTrack) {
footerParts.push(`${this._t("responses.play.upNext")}: ${nextTrack}`);
}
footerParts.push(this._t("responses.play.controlsHint", { prefix }));
embed.setFooter({ text: footerParts.join(" • ") });
this.emit("message", { embeds: [embed] });
}, },
}; };
+19 -1
View File
@@ -135,7 +135,25 @@ const PlaybackMixin = {
if (!this._wasRadio && !this._queueEndedSent && !this._autoplay) { if (!this._wasRadio && !this._queueEndedSent && !this._autoplay) {
this._queueEndedSent = true; this._queueEndedSent = true;
const prefix = this._getPrefix?.(this._guildId) ?? "%"; const prefix = this._getPrefix?.(this._guildId) ?? "%";
this.emit("message", { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this._t("responses._common.queueEnded", { prefix }))], system: true }); const embed = new EmbedBuilder()
.setColor(0xe9196c)
.setAuthor({ name: `🎧 ${this._t("responses.play.queueEndedTitle")}` })
.setTitle(this._t("responses.play.queueEndedHeading"))
.setDescription(this._t("responses.play.queueEndedBody", { prefix }))
.addFields(
{
name: `📻 ${this._t("responses.play.radioSuggestionTitle")}`,
value: this._t("responses.play.radioSuggestionDesc", { prefix }),
inline: true
},
{
name: `🔁 ${this._t("responses.play.autoplaySuggestionTitle")}`,
value: this._t("responses.play.autoplaySuggestionDesc", { prefix }),
inline: true
}
)
.setFooter({ text: `Remix Music • ${this._t("responses.play.voiceSessionPaused")}` });
this.emit("message", { embeds: [embed], system: true });
} }
this._wasRadio = false; this._wasRadio = false;
return; return;
+4 -7
View File
@@ -528,7 +528,7 @@ const SearchMixin = {
const video = this._lcTrackToVideo(fbResult.tracks[0], trackMeta); const video = this._lcTrackToVideo(fbResult.tracks[0], trackMeta);
if (video) { if (video) {
this.addToQueue(video, top); this.addToQueue(video, top);
events.emit("message", "Successfully added [" + video.title + "](" + video.url + ") to the queue. *(found on " + fb.label + ")*"); events.emit("message", this.buildAddedToQueueEmbed(video, top, trackMeta?.requester));
if (!this.queue.getCurrent()) { if (!this.queue.getCurrent()) {
this.playNext().catch(e => logger.error("[Player] playNext error:", e.message)); this.playNext().catch(e => logger.error("[Player] playNext error:", e.message));
} }
@@ -631,7 +631,7 @@ const SearchMixin = {
const video = this._lcTrackToVideo(firstTrack, trackMeta); const video = this._lcTrackToVideo(firstTrack, trackMeta);
if (video) { if (video) {
this.addToQueue(video, top); this.addToQueue(video, top);
events.emit("message", "Successfully added [" + video.title + "](" + video.url + ") to the queue."); events.emit("message", this.buildAddedToQueueEmbed(video, top, trackMeta?.requester));
if (playlistQuery) { if (playlistQuery) {
events.emit("message", "⚠️ Couldn't load the full playlist — added just this video."); events.emit("message", "⚠️ Couldn't load the full playlist — added just this video.");
} }
@@ -805,10 +805,7 @@ const SearchMixin = {
if (tracks.length === 1) { if (tracks.length === 1) {
this.addToQueue(tracks[0], top); this.addToQueue(tracks[0], top);
events.emit("message", this._t("responses.play.added", { events.emit("message", this.buildAddedToQueueEmbed(tracks[0], top, trackMeta?.requester));
title: tracks[0].title,
url: tracks[0].url,
}));
} else { } else {
this.addManyToQueue(tracks, top); this.addManyToQueue(tracks, top);
events.emit("message", this._t("responses.play.addedPlaylist", { count: tracks.length })); events.emit("message", this._t("responses.play.addedPlaylist", { count: tracks.length }));
@@ -846,7 +843,7 @@ const SearchMixin = {
try { try {
const track = this._buildExternalTrack(url, title, artist, trackType); const track = this._buildExternalTrack(url, title, artist, trackType);
this.addToQueue(track, top); this.addToQueue(track, top);
events.emit("message", "Added **[" + track.title + "](" + url + ")** to the queue."); events.emit("message", this.buildAddedToQueueEmbed(track, top));
if (!this.queue.getCurrent()) { if (!this.queue.getCurrent()) {
this.playNext().catch(e => { this.playNext().catch(e => {
+24
View File
@@ -386,6 +386,30 @@
"added": "تمت إضافة [{{title}}]({{url}}) إلى قائمة الانتظار بنجاح.", "added": "تمت إضافة [{{title}}]({{url}}) إلى قائمة الانتظار بنجاح.",
"addedPlaylist": "تمت إضافة **{{count}}** أغنية إلى قائمة الانتظار بنجاح.", "addedPlaylist": "تمت إضافة **{{count}}** أغنية إلى قائمة الانتظار بنجاح.",
"nowPlaying": "🎵 يعمل الآن [{{title}}]({{url}}) لـ {{author}} في <#{{channel}}>", "nowPlaying": "🎵 يعمل الآن [{{title}}]({{url}}) لـ {{author}} في <#{{channel}}>",
"addedToQueue": "تمت الإضافة إلى القائمة",
"position": "الترتيب",
"positionValue": "#{{position}} في القائمة",
"positionNext": "التالي مباشرة",
"duration": "المدة",
"estimatedWait": "الوقت المتوقع للبدء",
"estimatedWaitMinutes": "~{{minutes}} دقيقة",
"estimatedWaitLessMinute": "أقل من دقيقة",
"requestedBy": "طلب بواسطة {{user}}",
"queueCount": "القائمة: {{count}} {{plural}}",
"trackSingle": "مسار",
"trackPlural": "مسارات",
"autoNowPlaying": "تشغيل الآن",
"byAuthor": "لـ {{author}}",
"upNext": "التالي",
"controlsHint": "اكتب {{prefix}}np للتحكم بالتشغيل",
"queueEndedTitle": "انتهت قائمة الانتظار",
"queueEndedHeading": "انتهت جميع المسارات!",
"queueEndedBody": "لا توجد أغانٍ متبقية في القائمة. أضف المزيد عبر `{{prefix}}play <song>` أو واصل الاستماع!",
"radioSuggestionTitle": "راديو 24/7",
"radioSuggestionDesc": "جرب `{{prefix}}radio` لمحطات مستمرة",
"autoplaySuggestionTitle": "التشغيل التلقائي",
"autoplaySuggestionDesc": "اكتب `{{prefix}}autoplay` لاقتراحات غير منتهية",
"voiceSessionPaused": "جلسة الصوت متوقفة مؤقتاً",
"noResults": "**لم يتم العثور على نتائج لـ '{{query}}'.**", "noResults": "**لم يتم العثور على نتائج لـ '{{query}}'.**",
"searchFailed": "**فشل البحث. يرجى المحاولة مرة أخرى.**", "searchFailed": "**فشل البحث. يرجى المحاولة مرة أخرى.**",
"noData": "لم يتم تحميل المقطع — لم يتم إرجاع بيانات.", "noData": "لم يتم تحميل المقطع — لم يتم إرجاع بيانات.",
+24
View File
@@ -386,6 +386,30 @@
"added": "[{{title}}]({{url}}) بە سەرکەوتوویی زیادکرا بۆ ڕیزبەندییەکە.", "added": "[{{title}}]({{url}}) بە سەرکەوتوویی زیادکرا بۆ ڕیزبەندییەکە.",
"addedPlaylist": "**{{count}}** گۆرانی بە سەرکەوتوویی زیادکرا بۆ ڕیزبەندییەکە.", "addedPlaylist": "**{{count}}** گۆرانی بە سەرکەوتوویی زیادکرا بۆ ڕیزبەندییەکە.",
"nowPlaying": "🎵 ئێستا پەخش دەکرێت [{{title}}]({{url}}) لەلایەن {{author}} لە <#{{channel}}>", "nowPlaying": "🎵 ئێستا پەخش دەکرێت [{{title}}]({{url}}) لەلایەن {{author}} لە <#{{channel}}>",
"addedToQueue": "زیادکرا بۆ ڕیزبەندی",
"position": "ڕیزبەندی",
"positionValue": "#{{position}} لە ڕیزبەندی",
"positionNext": "دواتر راستەوخۆ",
"duration": "ماوە",
"estimatedWait": "کاتی پێشبینیکراو",
"estimatedWaitMinutes": "~{{minutes}} خولەک",
"estimatedWaitLessMinute": "کەمتر لە ١ خولەک",
"requestedBy": "داواکراوە لەلایەن {{user}}",
"queueCount": "ڕیزبەندی: {{count}} {{plural}}",
"trackSingle": "گۆرانی",
"trackPlural": "گۆرانی",
"autoNowPlaying": "ئێستا پەخش دەکرێت",
"byAuthor": "لەلایەن {{author}}",
"upNext": "دواتر",
"controlsHint": "بۆ کۆنترۆڵەکان بنووسە {{prefix}}np",
"queueEndedTitle": "ڕیزبەندی کۆتایی هات",
"queueEndedHeading": "هەموو گۆرانییەکان پەخشکران!",
"queueEndedBody": "هیچ گۆرانییەک لە ڕیزبەندی نەماوە. گۆرانی زیاتر زیادبکە بە `{{prefix}}play <گۆرانی>`!",
"radioSuggestionTitle": "ڕادیۆی ٢٤/٧",
"radioSuggestionDesc": "تاقیبکەوە `{{prefix}}radio` بۆ ڕادیۆی بەردەوام",
"autoplaySuggestionTitle": "پەخشی خۆکار",
"autoplaySuggestionDesc": "بنووسە `{{prefix}}autoplay` بۆ پێشنیاری بەردەوام",
"voiceSessionPaused": "دەنگ ڕاگیراوە",
"noResults": "**هیچ ئەنجامێک نەدۆزرایەوە بۆ '{{query}}'.**", "noResults": "**هیچ ئەنجامێک نەدۆزرایەوە بۆ '{{query}}'.**",
"searchFailed": "**گەڕان سەرکەوتوو نەبوو. تکایە دووبارە هەوڵبدەرەوە.**", "searchFailed": "**گەڕان سەرکەوتوو نەبوو. تکایە دووبارە هەوڵبدەرەوە.**",
"noData": "تراکەکە بارنەکرا — هیچ داتایەک نەگەڕایەوە.", "noData": "تراکەکە بارنەکرا — هیچ داتایەک نەگەڕایەوە.",
+24
View File
@@ -386,6 +386,30 @@
"added": "[{{title}}]({{url}}) erfolgreich zur Warteschlange hinzugefügt.", "added": "[{{title}}]({{url}}) erfolgreich zur Warteschlange hinzugefügt.",
"addedPlaylist": "**{{count}}** Songs erfolgreich zur Warteschlange hinzugefügt.", "addedPlaylist": "**{{count}}** Songs erfolgreich zur Warteschlange hinzugefügt.",
"nowPlaying": "🎵 Spielt jetzt [{{title}}]({{url}}) von {{author}} in <#{{channel}}>", "nowPlaying": "🎵 Spielt jetzt [{{title}}]({{url}}) von {{author}} in <#{{channel}}>",
"addedToQueue": "Zur Warteschlange hinzugefügt",
"position": "Position",
"positionValue": "#{{position}} in Warteschlange",
"positionNext": "Als nächstes",
"duration": "Dauer",
"estimatedWait": "Geschätzte Wartezeit",
"estimatedWaitMinutes": "~{{minutes}} Min.",
"estimatedWaitLessMinute": "< 1 Min.",
"requestedBy": "Angefordert von {{user}}",
"queueCount": "Warteschlange: {{count}} {{plural}}",
"trackSingle": "Track",
"trackPlural": "Tracks",
"autoNowPlaying": "Spielt jetzt",
"byAuthor": "von {{author}}",
"upNext": "Weiter",
"controlsHint": "Tippe {{prefix}}np für Player-Steuerung",
"queueEndedTitle": "Warteschlange beendet",
"queueEndedHeading": "Alles abgespielt!",
"queueEndedBody": "Keine Songs mehr in der Warteschlange. Füge neue Songs mit `{{prefix}}play <song>` hinzu oder lass die Musik weiterlaufen!",
"radioSuggestionTitle": "24/7 Radio",
"radioSuggestionDesc": "Probiere `{{prefix}}radio` für Non-Stop-Sender",
"autoplaySuggestionTitle": "Autoplay",
"autoplaySuggestionDesc": "Tippe `{{prefix}}autoplay` für endlose Vorschläge",
"voiceSessionPaused": "Sprachsitzung pausiert",
"noResults": "**Keine Ergebnisse für '{{query}}' gefunden.**", "noResults": "**Keine Ergebnisse für '{{query}}' gefunden.**",
"searchFailed": "**Suche fehlgeschlagen. Bitte versuche es erneut.**", "searchFailed": "**Suche fehlgeschlagen. Bitte versuche es erneut.**",
"noData": "Track konnte nicht geladen werden — keine Daten zurückgegeben.", "noData": "Track konnte nicht geladen werden — keine Daten zurückgegeben.",
+24
View File
@@ -503,6 +503,30 @@
"added": "Successfully added [{{title}}]({{url}}) to the queue.", "added": "Successfully added [{{title}}]({{url}}) to the queue.",
"addedPlaylist": "Successfully added **{{count}}** songs to the queue.", "addedPlaylist": "Successfully added **{{count}}** songs to the queue.",
"nowPlaying": "🎵 Now playing [{{title}}]({{url}}) by {{author}} in <#{{channel}}>", "nowPlaying": "🎵 Now playing [{{title}}]({{url}}) by {{author}} in <#{{channel}}>",
"addedToQueue": "Added to Queue",
"position": "Position",
"positionValue": "#{{position}} in queue",
"positionNext": "Up Next",
"duration": "Duration",
"estimatedWait": "Estimated Play",
"estimatedWaitMinutes": "~{{minutes}} mins",
"estimatedWaitLessMinute": "< 1 min",
"requestedBy": "Requested by {{user}}",
"queueCount": "Queue: {{count}} {{plural}}",
"trackSingle": "track",
"trackPlural": "tracks",
"autoNowPlaying": "Now Playing",
"byAuthor": "by {{author}}",
"upNext": "Next",
"controlsHint": "Type {{prefix}}np for player controls",
"queueEndedTitle": "Queue Finished",
"queueEndedHeading": "All caught up!",
"queueEndedBody": "No more songs left in queue. Add more songs with `{{prefix}}play <song>` or keep the party going!",
"radioSuggestionTitle": "24/7 Radio",
"radioSuggestionDesc": "Try `{{prefix}}radio` for non-stop music",
"autoplaySuggestionTitle": "Autoplay",
"autoplaySuggestionDesc": "Type `{{prefix}}autoplay` for endless tracks",
"voiceSessionPaused": "Voice Session Paused",
"noResults": "**No results found for '{{query}}'.**", "noResults": "**No results found for '{{query}}'.**",
"searchFailed": "**Search failed. Please try again.**", "searchFailed": "**Search failed. Please try again.**",
"noData": "Could not load track - no data returned.", "noData": "Could not load track - no data returned.",
+24
View File
@@ -386,6 +386,30 @@
"added": "[{{title}}]({{url}}) adicionado à fila com sucesso.", "added": "[{{title}}]({{url}}) adicionado à fila com sucesso.",
"addedPlaylist": "**{{count}}** músicas adicionadas à fila com sucesso.", "addedPlaylist": "**{{count}}** músicas adicionadas à fila com sucesso.",
"nowPlaying": "🎵 Tocando agora [{{title}}]({{url}}) por {{author}} em <#{{channel}}>", "nowPlaying": "🎵 Tocando agora [{{title}}]({{url}}) por {{author}} em <#{{channel}}>",
"addedToQueue": "Adicionado à Fila",
"position": "Posição",
"positionValue": "#{{position}} na fila",
"positionNext": "A Seguir",
"duration": "Duração",
"estimatedWait": "Início Estimado",
"estimatedWaitMinutes": "~{{minutes}} min",
"estimatedWaitLessMinute": "< 1 min",
"requestedBy": "Pedido por {{user}}",
"queueCount": "Fila: {{count}} {{plural}}",
"trackSingle": "música",
"trackPlural": "músicas",
"autoNowPlaying": "Tocando Agora",
"byAuthor": "por {{author}}",
"upNext": "Próxima",
"controlsHint": "Digite {{prefix}}np para controles do player",
"queueEndedTitle": "Fila Finalizada",
"queueEndedHeading": "Tudo reproduzido!",
"queueEndedBody": "Não há mais músicas na fila. Adicione mais com `{{prefix}}play <música>` ou continue a festa!",
"radioSuggestionTitle": "Rádio 24/7",
"radioSuggestionDesc": "Experimente `{{prefix}}radio` para estações sem parar",
"autoplaySuggestionTitle": "Autoplay",
"autoplaySuggestionDesc": "Digite `{{prefix}}autoplay` para recomendações infinitas",
"voiceSessionPaused": "Sessão de Voz Pausada",
"noResults": "**Nenhum resultado encontrado para '{{query}}'.**", "noResults": "**Nenhum resultado encontrado para '{{query}}'.**",
"searchFailed": "**A busca falhou. Por favor, tente novamente.**", "searchFailed": "**A busca falhou. Por favor, tente novamente.**",
"noData": "Não foi possível carregar a faixa — nenhum dado retornado.", "noData": "Não foi possível carregar a faixa — nenhum dado retornado.",
+24
View File
@@ -492,6 +492,30 @@
"added": "[{{title}}]({{url}}) kuyruğa başarıyla eklendi.", "added": "[{{title}}]({{url}}) kuyruğa başarıyla eklendi.",
"addedPlaylist": "**{{count}}** şarkı kuyruğa başarıyla eklendi.", "addedPlaylist": "**{{count}}** şarkı kuyruğa başarıyla eklendi.",
"nowPlaying": "🎵 <#{{channel}}> kanalında {{author}} tarafından [{{title}}]({{url}}) çalınıyor", "nowPlaying": "🎵 <#{{channel}}> kanalında {{author}} tarafından [{{title}}]({{url}}) çalınıyor",
"addedToQueue": "Kuyruğa Eklendi",
"position": "Sıra",
"positionValue": "Kuyrukta #{{position}}",
"positionNext": "Sıradaki",
"duration": "Süre",
"estimatedWait": "Tahmini Başlama",
"estimatedWaitMinutes": "~{{minutes}} dk",
"estimatedWaitLessMinute": "< 1 dk",
"requestedBy": "İsteyen: {{user}}",
"queueCount": "Kuyruk: {{count}} {{plural}}",
"trackSingle": "şarkı",
"trackPlural": "şarkı",
"autoNowPlaying": "Şimdi Çalıyor",
"byAuthor": "{{author}} tarafından",
"upNext": "Sıradaki",
"controlsHint": "Oynatıcı kontrolleri için {{prefix}}np yazın",
"queueEndedTitle": "Kuyruk Bitti",
"queueEndedHeading": "Tüm şarkılar çalındı!",
"queueEndedBody": "Kuyrukta çalınacak şarkı kalmadı. `{{prefix}}play <şarkı>` ile yeni şarkılar ekleyin veya müziğe devam edin!",
"radioSuggestionTitle": "7/24 Radyo",
"radioSuggestionDesc": "Kesintisiz istasyonlar için `{{prefix}}radio` deneyin",
"autoplaySuggestionTitle": "Otomatik Oynatma",
"autoplaySuggestionDesc": "Sonsuz öneriler için `{{prefix}}autoplay` yazın",
"voiceSessionPaused": "Ses Oturumu Duraklatıldı",
"noResults": "'{{query}}' için sonuç bulunamadı.", "noResults": "'{{query}}' için sonuç bulunamadı.",
"searchFailed": "**Arama başarısız. Lütfen tekrar deneyin.**", "searchFailed": "**Arama başarısız. Lütfen tekrar deneyin.**",
"noData": "Parça yüklenemedi - veri döndürülmedi.", "noData": "Parça yüklenemedi - veri döndürülmedi.",