mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(ui): modernize bot commands, Last.fm suite, and system embeds
- Modernize audio controls (%volume, %volumedefault, %bassboost, %autoplay, %trackopt, %shuffle, %clear, %list, %pause, %resume) - Upgrade Last.fm suite (%lastfm play directory, spotlight cards, music podiums, tags, and profile stats) - Polish system & voice embeds (%vote supporter verification, %servers network directory, %forceleave, and 24/7 watchdog) - Achieve 100% localization parity across all 6 locales (en, ar-SA, ckb, tr, de-DE, pt-BR) with zero missing keys
This commit is contained in:
1 parent
885db461ce
commit
e8171dce26
33 files changed
+1529
-440
No files matched your search
@@ -594,9 +594,9 @@ export async function run(msg, data) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `🔁 ${this.t(msg, "responses.autoplay.autoplayTitleEnabled")}` })
|
||||
.setTitle("🟢 Active")
|
||||
.setTitle(this.t(msg, "responses.autoplay.statusActive"))
|
||||
.setDescription(this.t(msg, "responses.autoplay.autoplayDescEnabled"))
|
||||
.setFooter({ text: `${this.t(msg, "responses.autoplay.autoplayEngine")} • ${prefix}autoplay to disable` });
|
||||
.setFooter({ text: `${this.t(msg, "responses.autoplay.autoplayEngine")} • ${this.t(msg, "responses.autoplay.disableHint", { prefix })}` });
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
} else {
|
||||
@@ -614,9 +614,9 @@ export async function run(msg, data) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏹️ ${this.t(msg, "responses.autoplay.autoplayTitleDisabled")}` })
|
||||
.setTitle("🔴 Disabled")
|
||||
.setTitle(this.t(msg, "responses.autoplay.statusDisabled"))
|
||||
.setDescription(this.t(msg, "responses.autoplay.autoplayDescDisabled"))
|
||||
.setFooter({ text: `${prefix}autoplay to enable` });
|
||||
.setFooter({ text: this.t(msg, "responses.autoplay.enableHint", { prefix }) });
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@ export async function run(message, data) {
|
||||
if (levelArg === "off" || levelArg === "none" || levelArg === "reset") {
|
||||
await p.applyFilter({}, null);
|
||||
embed.setAuthor({ name: `🔊 ${this.t(message, "responses.bassboost.eqTitle")}` })
|
||||
.setTitle("⏹️ Bass Boost Off")
|
||||
.setTitle(this.t(message, "responses.bassboost.offTitle"))
|
||||
.setDescription(this.t(message, "responses.bassboost.disabled"))
|
||||
.setFooter({ text: `${prefix}bassboost <low|medium|hard>` });
|
||||
.setFooter({ text: this.t(message, "responses.bassboost.offFooter", { prefix }) });
|
||||
return message.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export async function run(message, data) {
|
||||
|
||||
embed
|
||||
.setAuthor({ name: `🔊 ${this.t(message, "responses.bassboost.eqTitle")}` })
|
||||
.setTitle(`Bass Boost: ${preset.label}`)
|
||||
.setTitle(this.t(message, "responses.bassboost.activeTitle", { level: preset.label }))
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: this.t(message, "responses.bassboost.resetHint", { prefix }) });
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ export async function run(msg, data) {
|
||||
.setAuthor({ name: `🗑️ ${this.t(msg, "responses.clear.clearedTitle")}` })
|
||||
.setTitle(this.t(msg, "responses.clear.cleared"))
|
||||
.setDescription(this.t(msg, "responses.clear.clearedSummary", { count, plural: pluralStr }))
|
||||
.setFooter({ text: `${prefix}play <song> to start a new queue` });
|
||||
.setFooter({ text: this.t(msg, "responses.clear.footerHint", { prefix }) });
|
||||
|
||||
msg.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
+11
-8
@@ -35,24 +35,27 @@ export const command = new CommandBuilder()
|
||||
*/
|
||||
export async function run(msg, data) {
|
||||
const cid = cleanId(data.get("channelId").value);
|
||||
const buildForceLeaveEmbed = (desc) => new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.forceleave.authorAdmin") })
|
||||
.setTitle(this.t(msg, "responses.forceleave.titleEviction"))
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: this.t(msg, "responses.forceleave.footerTip", { channel: cid }) });
|
||||
|
||||
const targetChannel = await resolveChannelCached(this.client, cid);
|
||||
if (!targetChannel) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.forceleave.channelNotFound"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
return msg.reply({ embeds: [buildForceLeaveEmbed(this.t(msg, "responses.forceleave.channelNotFound"))] });
|
||||
}
|
||||
if (cleanId(msg.message?.guildId) !== cleanId(targetChannel.guildId)) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.forceleave.wrongServer"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
return msg.reply({ embeds: [buildForceLeaveEmbed(this.t(msg, "responses.forceleave.wrongServer"))] });
|
||||
}
|
||||
const p = this.players.playerMap.get(cid)
|
||||
?? [...this.players.playerMap.values()].find((player) => cleanId(player?._channelId) === cid);
|
||||
if (!p) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.forceleave.playerNotFound"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
return msg.reply({ embeds: [buildForceLeaveEmbed(this.t(msg, "responses.forceleave.playerNotFound"))] });
|
||||
}
|
||||
if (!p.connection) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.forceleave.playerNotInit"));
|
||||
return msg.reply({ embeds: [embed] });
|
||||
return msg.reply({ embeds: [buildForceLeaveEmbed(this.t(msg, "responses.forceleave.playerNotInit"))] });
|
||||
}
|
||||
await this.players.leave(msg, cid);
|
||||
}
|
||||
+13
-4
@@ -67,8 +67,13 @@ export async function run(message, data) {
|
||||
if (rawArg) {
|
||||
const resolvedId = resolveChannelId(rawArg, this, message);
|
||||
if (!resolvedId) {
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.join.voiceChannelNotFound"));
|
||||
const prefix = this.handler.getPrefix(getMessageGuildId(message));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(message, "responses.join.promptAuthor") })
|
||||
.setTitle(this.t(message, "responses.join.promptTitle"))
|
||||
.setDescription(this.t(message, "responses.join.voiceChannelNotFound"))
|
||||
.setFooter({ text: this.t(message, "responses.join.promptFooter", { prefix }) });
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
return this.players.initPlayer(message, resolvedId);
|
||||
@@ -77,8 +82,12 @@ export async function run(message, data) {
|
||||
const { channelId: cid } = await this.players.checkVoiceChannels(message);
|
||||
if (!cid) {
|
||||
const prefix = this.handler.getPrefix(getMessageGuildId(message));
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setDescription(this.t(message, "responses.join.noVoiceChannel", { prefix }));
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(message, "responses.join.promptAuthor") })
|
||||
.setTitle(this.t(message, "responses.join.promptTitle"))
|
||||
.setDescription(this.t(message, "responses.join.noVoiceChannel", { prefix }))
|
||||
.setFooter({ text: this.t(message, "responses.join.promptFooter", { prefix }) });
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
@@ -159,23 +159,52 @@ export async function runDiscoveryActions(msg, data, lastfm, prefix, userId, tar
|
||||
});
|
||||
}
|
||||
|
||||
const lines = trendingData.map((item, i) => {
|
||||
const num = String(i + 1).padStart(2, " ");
|
||||
const link = item.url ? `[${item.name}](${item.url})` : item.name;
|
||||
const artistStr = item.artist ? ` by **${item.artist}**` : "";
|
||||
const extra = item.listeners ? ` — ${Utils.formatNumber(item.listeners)} ${this.t(msg, "responses.lastfm.listeners")}` : item.playcount ? ` — ${Utils.formatNumber(item.playcount)} ${this.t(msg, "responses.lastfm.plays")}` : "";
|
||||
return `\`${num}.\` ${link}${artistStr}${extra}`;
|
||||
});
|
||||
const isArtists = tokenTextTr === "artists";
|
||||
trendingTitle = isArtists
|
||||
? this.t(msg, "responses.lastfm.trendingTitleArtists")
|
||||
: this.t(msg, "responses.lastfm.trendingTitleTracks");
|
||||
|
||||
const desc = lines.join("\n").slice(0, 4096);
|
||||
const top1 = trendingData[0];
|
||||
const runners = trendingData.slice(1, 10);
|
||||
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(trendingTitle)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: `💡 Use token option: tracks or artists` })]
|
||||
});
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.trendingAuthor") })
|
||||
.setTitle(trendingTitle)
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.trendingFooterPro", { prefix }) });
|
||||
|
||||
if (top1) {
|
||||
const link = top1.url ? `[${top1.name}](${top1.url})` : top1.name;
|
||||
const artistStr = top1.artist ? ` by **${top1.artist}**` : "";
|
||||
const extra = top1.listeners
|
||||
? ` · **${Utils.formatNumber(top1.listeners)}** ${this.t(msg, "responses.lastfm.listeners")}`
|
||||
: (top1.playcount ? ` · **${Utils.formatNumber(top1.playcount)}** ${this.t(msg, "responses.lastfm.plays")}` : "");
|
||||
embed.addFields({
|
||||
name: `🥇 ${this.t(msg, "responses.lastfm.trendingPodium1")}`,
|
||||
value: `**${link}**${artistStr}${extra}`,
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
if (runners.length > 0) {
|
||||
const MEDALS = ["🥈", "🥉"];
|
||||
const lines = runners.map((item, i) => {
|
||||
const badge = i < 2 ? MEDALS[i] : `\`#${i + 2}\``;
|
||||
const link = item.url ? `[${item.name}](${item.url})` : item.name;
|
||||
const artistStr = item.artist ? ` · ${item.artist}` : "";
|
||||
const extra = item.listeners
|
||||
? ` (${Utils.formatNumber(item.listeners)})`
|
||||
: (item.playcount ? ` (${Utils.formatNumber(item.playcount)})` : "");
|
||||
return `${badge} **${link}**${artistStr}${extra}`;
|
||||
});
|
||||
embed.addFields({
|
||||
name: `🔥 ${this.t(msg, "responses.lastfm.trendingRunnersUp")}`,
|
||||
value: lines.join("\n").slice(0, 1024),
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
case "geo":
|
||||
|
||||
+41
-80
@@ -1,8 +1,7 @@
|
||||
/**
|
||||
* @module commands/lastfm/help
|
||||
* @description Fallback help action for the lastfm command (the original
|
||||
* switch's `default` branch). Extracted verbatim; reached when the action
|
||||
* matches no known action name.
|
||||
* @description Fallback help action for the lastfm command.
|
||||
* Dispatched when the subcommand action matches 'help' or an unknown action.
|
||||
*/
|
||||
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
@@ -17,83 +16,45 @@ import { getGlobalColor } from "../../src/ui/index.mjs";
|
||||
* @param {string} userId - The invoking user's ID.
|
||||
* @param {string|null} targetUserId - The targeted user's ID, if any.
|
||||
* @param {string} action - The resolved action name.
|
||||
* @returns {Promise<*>} Whatever the original switch returned for this action.
|
||||
* @returns {Promise<*>} Embed response for Last.fm help.
|
||||
*/
|
||||
export async function runLastFmHelp(msg, data, lastfm, prefix, userId, targetUserId, action) {
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setDescription([
|
||||
`🎵 **Last.fm Commands:**`,
|
||||
``,
|
||||
`\`${prefix}lastfm link\` — Link your Last.fm account`,
|
||||
`\`${prefix}lastfm unlink\` — Disconnect your account`,
|
||||
`\`${prefix}lastfm scrobble\` — Toggle auto-scrobbling`,
|
||||
`\`${prefix}lastfm np\` — Show your Last.fm now playing`,
|
||||
`\`${prefix}lastfm profile\` — View your Last.fm profile (or another user's with user option)`,
|
||||
`\`${prefix}lastfm loved\` — View your loved tracks`,
|
||||
`\`${prefix}lastfm top\` — View your top tracks (supports period)`,
|
||||
`\`${prefix}lastfm artists\` — View your top artists (supports period)`,
|
||||
`\`${prefix}lastfm recent\` — View your recent tracks`,
|
||||
`\`${prefix}lastfm playlists\` — View your Last.fm playlists`,
|
||||
`\`${prefix}lastfm leaderboard\` — Scrobble leaderboard`,
|
||||
`\`${prefix}lastfm love\` — Love the current track`,
|
||||
`\`${prefix}lastfm unlove\` — Unlove the current track`,
|
||||
``,
|
||||
`🔍 **Info Commands:**`,
|
||||
`\`${prefix}lastfm whoknows [artist]\` — Who in the server listens to an artist`,
|
||||
`\`${prefix}lastfm whoknowstrack\` — Who knows a specific track`,
|
||||
`\`${prefix}lastfm whoknowsalbum\` — Who knows a specific album`,
|
||||
`\`${prefix}lastfm artistinfo\` — Detailed info about an artist`,
|
||||
`\`${prefix}lastfm albuminfo\` — Detailed info about an album`,
|
||||
`\`${prefix}lastfm trackinfo\` — Detailed info about a track`,
|
||||
`\`${prefix}lastfm topalbums\` — View your top albums (supports period)`,
|
||||
`\`${prefix}lastfm toptags\` — View your top tags/genres`,
|
||||
`\`${prefix}lastfm tag <name>\` — View info about a specific tag`,
|
||||
`\`${prefix}lastfm compare @user\` — Compare your taste with another user`,
|
||||
`\`${prefix}lastfm cover\` — Get album cover art for the current track`,
|
||||
``,
|
||||
`🏷️ **Tag Commands:**`,
|
||||
`\`${prefix}lastfm artisttags\` — Top tags for an artist`,
|
||||
`\`${prefix}lastfm albumtags\` — Top tags for an album`,
|
||||
`\`${prefix}lastfm tracktags\` — Top tags for a track`,
|
||||
`\`${prefix}lastfm tagalbums <tag>\` — Top albums for a tag`,
|
||||
``,
|
||||
`👥 **Social Commands:**`,
|
||||
`\`${prefix}lastfm affinity\` — Find users with similar taste`,
|
||||
`\`${prefix}lastfm crowns\` — View your artist crowns (#1 listener)`,
|
||||
`\`${prefix}lastfm friends\` — View your Last.fm friends`,
|
||||
`\`${prefix}lastfm refreshmembers\` — Refresh server member cache`,
|
||||
``,
|
||||
`📊 **Charts & Discovery:**`,
|
||||
`\`${prefix}lastfm weekly [artists|tracks|albums]\` — Weekly charts`,
|
||||
`\`${prefix}lastfm trending [tracks|artists]\` — Global trending on Last.fm`,
|
||||
`\`${prefix}lastfm geo [artists|tracks] <country>\` — Top by country`,
|
||||
`\`${prefix}lastfm artisttracks\` — Your scrobbles for an artist`,
|
||||
`\`${prefix}lastfm search <query>\` — Universal search`,
|
||||
``,
|
||||
`🎶 **Play from Last.fm:**`,
|
||||
`\`${prefix}lastfm play loved\` — Play your loved tracks`,
|
||||
`\`${prefix}lastfm play top\` — Play your top tracks`,
|
||||
`\`${prefix}lastfm play recent\` — Play your recent tracks`,
|
||||
`\`${prefix}lastfm play albums\` — Play your top albums`,
|
||||
`\`${prefix}lastfm play artists\` — Play your top artists' tracks`,
|
||||
`\`${prefix}lastfm play playlist 1\` — Play a playlist`,
|
||||
``,
|
||||
`🎧 **Play with a specific provider (defaults to \`top\`):**`,
|
||||
`\`${prefix}lastfm play sp\` or \`${prefix}lastfm play sp:top\` — Play top tracks, search on Spotify`,
|
||||
`\`${prefix}lastfm play td\` or \`${prefix}lastfm play td:top\` — Play top tracks, search on Tidal`,
|
||||
`\`${prefix}lastfm play dz\` or \`${prefix}lastfm play dz:top\` — Play top tracks, search on Deezer`,
|
||||
`\`${prefix}lastfm play yt\` or \`${prefix}lastfm play yt:top\` — Play top tracks, search on YouTube`,
|
||||
``,
|
||||
`🎧 **Last.fm as resolve provider (all categories):**`,
|
||||
`\`${prefix}lastfm play lf:loved\` — Play loved tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:top\` — Play top tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:recent\` — Play recent tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:albums\` — Play top albums, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:artists\` — Play top artists, search on Last.fm`,
|
||||
``,
|
||||
`💡 Or use inline: \`${prefix}play lastfm:loved\` or \`${prefix}play lastfm:sp\` or \`${prefix}play lastfm:td:top\``,
|
||||
].join("\n"))]
|
||||
});
|
||||
const pfx = prefix || "%";
|
||||
|
||||
const accountLines = [
|
||||
`• \`${pfx}fm link\` · \`${pfx}fm unlink\` · \`${pfx}fm scrobble\` · \`${pfx}fm np\``,
|
||||
`• \`${pfx}fm profile\` · \`${pfx}fm loved\` · \`${pfx}fm top\` · \`${pfx}fm artists\` · \`${pfx}fm recent\``,
|
||||
`• \`${pfx}fm love\` · \`${pfx}fm unlove\` · \`${pfx}fm playlists\``
|
||||
].join("\n");
|
||||
|
||||
const discoveryLines = [
|
||||
`• \`${pfx}fm artistinfo\` · \`${pfx}fm albuminfo\` · \`${pfx}fm trackinfo\` · \`${pfx}fm cover\``,
|
||||
`• \`${pfx}fm trending\` · \`${pfx}fm weekly\` · \`${pfx}fm tag <name>\` · \`${pfx}fm geo <country>\``,
|
||||
`• \`${pfx}fm artisttags\` · \`${pfx}fm albumtags\` · \`${pfx}fm tagalbums <tag>\``
|
||||
].join("\n");
|
||||
|
||||
const socialLines = [
|
||||
`• \`${pfx}whoknows [artist]\` · \`${pfx}fm wkt\` · \`${pfx}fm wka\``,
|
||||
`• \`${pfx}fm crowns\` · \`${pfx}fm compare @user\` · \`${pfx}fm affinity\` · \`${pfx}fm lb\``,
|
||||
`• \`${pfx}fm friends\` · \`${pfx}fm refreshmembers\``
|
||||
].join("\n");
|
||||
|
||||
const playbackLines = [
|
||||
`• \`${pfx}fm play loved\` · \`${pfx}fm play top\` · \`${pfx}fm play albums\` · \`${pfx}fm play artists\``,
|
||||
`• Cross-provider: \`${pfx}fm play sp:top\` (Spotify) · \`yt:top\` · \`dz:top\` · \`td:top\``
|
||||
].join("\n");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.helpAuthor") })
|
||||
.setTitle(this.t(msg, "responses.lastfm.helpTitle"))
|
||||
.addFields(
|
||||
{ name: this.t(msg, "responses.lastfm.helpCategoryAccount"), value: accountLines, inline: false },
|
||||
{ name: this.t(msg, "responses.lastfm.helpCategoryDiscovery"), value: discoveryLines, inline: false },
|
||||
{ name: this.t(msg, "responses.lastfm.helpCategorySocial"), value: socialLines, inline: false },
|
||||
{ name: this.t(msg, "responses.lastfm.helpCategoryPlayback"), value: playbackLines, inline: false }
|
||||
)
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.helpFooterPro", { prefix: pfx }) });
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
+104
-36
@@ -196,18 +196,39 @@ export async function runInfoActions(msg, data, lastfm, prefix, userId, targetUs
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.albumSpotlightAuthor") })
|
||||
.setTitle(`💿 ${info.name}`)
|
||||
.setURL(info.url || undefined)
|
||||
.setThumbnail(info.image || undefined);
|
||||
|
||||
const fields = [];
|
||||
|
||||
if (info.artist) {
|
||||
fields.push({ name: "Artist", value: info.artist, inline: true });
|
||||
embed.setDescription(`*by* **${info.artist}**`);
|
||||
}
|
||||
|
||||
const fields = [];
|
||||
|
||||
if (info.userplaycount != null && user) {
|
||||
fields.push({ name: "Your Plays", value: Utils.formatNumber(info.userplaycount), inline: true });
|
||||
fields.push({
|
||||
name: `🎧 ${this.t(msg, "responses.lastfm.albumFieldYourPlays")}`,
|
||||
value: `**${Utils.formatNumber(info.userplaycount)}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.tracks?.length) {
|
||||
fields.push({
|
||||
name: `🎼 ${this.t(msg, "responses.lastfm.albumFieldTracks")}`,
|
||||
value: `**${info.tracks.length}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.listeners) {
|
||||
fields.push({
|
||||
name: `👥 ${this.t(msg, "responses.lastfm.trackFieldListeners")}`,
|
||||
value: `**${Utils.formatNumber(Number(info.listeners))}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.tags?.length) {
|
||||
@@ -215,21 +236,36 @@ export async function runInfoActions(msg, data, lastfm, prefix, userId, targetUs
|
||||
const tagLower = String(t).toLowerCase().replace(/\s+/g, "+");
|
||||
return `[${t}](https://www.last.fm/tag/${encodeURIComponent(tagLower)})`;
|
||||
}).join(" · ");
|
||||
fields.push({ name: "Tags", value: tagStr, inline: false });
|
||||
fields.push({
|
||||
name: `🏷️ ${this.t(msg, "responses.lastfm.albumFieldTags")}`,
|
||||
value: tagStr,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.tracks?.length) {
|
||||
const trackLines = info.tracks.slice(0, 15).map((t, i) => {
|
||||
const num = String(i + 1).padStart(2, " ");
|
||||
const trackLines = info.tracks.slice(0, 10).map((t, i) => {
|
||||
const num = String(i + 1).padStart(2, "0");
|
||||
const dur = t.duration > 0 ? ` (${formatDuration(t.duration)})` : "";
|
||||
const link = t.url ? `[${t.name}](${t.url})` : t.name;
|
||||
return `\`${num}.\` ${link}${dur}`;
|
||||
});
|
||||
fields.push({ name: "Tracklist", value: trackLines.join("\n").slice(0, 1024), inline: false });
|
||||
const extraCount = info.tracks.length > 10 ? `\n*... +${info.tracks.length - 10} more*` : "";
|
||||
fields.push({
|
||||
name: `📜 ${this.t(msg, "responses.lastfm.albumFieldTracklist")}`,
|
||||
value: (trackLines.join("\n") + extraCount).slice(0, 1024),
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
embed.addFields(...fields);
|
||||
embed.setFooter({ text: user ? `Last.fm: ${user.username}` : "Last.fm" });
|
||||
embed.setFooter({
|
||||
text: this.t(msg, "responses.lastfm.albumFooterPro", {
|
||||
prefix,
|
||||
artist: info.artist || "Artist",
|
||||
album: info.name,
|
||||
}),
|
||||
});
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
@@ -291,6 +327,7 @@ export async function runInfoActions(msg, data, lastfm, prefix, userId, targetUs
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.trackSpotlightAuthor") })
|
||||
.setTitle(`🎵 ${info.name}`)
|
||||
.setURL(info.url || undefined);
|
||||
|
||||
@@ -298,30 +335,55 @@ export async function runInfoActions(msg, data, lastfm, prefix, userId, targetUs
|
||||
embed.setThumbnail(info.album?.image?.[2]?.["#text"] || info.album?.image?.[1]?.["#text"]);
|
||||
}
|
||||
|
||||
let desc = "";
|
||||
if (info.artist?.name || info.artist?.["#text"]) {
|
||||
const aName = String(info.artist?.name ?? info.artist?.["#text"]);
|
||||
desc += `*by* **${aName}**`;
|
||||
}
|
||||
if (info.album?.title) {
|
||||
desc += ` · *from* **${info.album.title}**`;
|
||||
}
|
||||
if (info.wiki?.summary) {
|
||||
const cleanSummary = info.wiki.summary.replace(/<[^>]*>/g, "").trim();
|
||||
if (cleanSummary.length > 0) {
|
||||
const truncated = cleanSummary.length > 200 ? cleanSummary.slice(0, 197) + "..." : cleanSummary;
|
||||
desc += (desc ? "\n\n" : "") + truncated;
|
||||
}
|
||||
}
|
||||
if (desc) embed.setDescription(desc);
|
||||
|
||||
const fields = [];
|
||||
|
||||
if (info.artist?.name || info.artist?.["#text"]) {
|
||||
fields.push({ name: "Artist", value: String(info.artist?.name ?? info.artist?.["#text"] ?? "Unknown"), inline: true });
|
||||
}
|
||||
|
||||
if (info.album?.title) {
|
||||
fields.push({ name: "Album", value: info.album.title, inline: true });
|
||||
}
|
||||
|
||||
if (info.listeners) {
|
||||
fields.push({ name: "Listeners", value: Utils.formatNumber(Number(info.listeners)), inline: true });
|
||||
fields.push({
|
||||
name: `👥 ${this.t(msg, "responses.lastfm.trackFieldListeners")}`,
|
||||
value: `**${Utils.formatNumber(Number(info.listeners))}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.playcount) {
|
||||
fields.push({ name: "Global Plays", value: Utils.formatNumber(Number(info.playcount)), inline: true });
|
||||
fields.push({
|
||||
name: `📈 ${this.t(msg, "responses.lastfm.trackFieldPlays")}`,
|
||||
value: `**${Utils.formatNumber(Number(info.playcount))}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (info.userplaycount) {
|
||||
fields.push({ name: "Your Plays", value: Utils.formatNumber(Number(info.userplaycount)), inline: true });
|
||||
fields.push({
|
||||
name: `🎧 ${this.t(msg, "responses.lastfm.trackFieldUserPlays")}`,
|
||||
value: `**${Utils.formatNumber(Number(info.userplaycount))}**`,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
const userLoved = info.userloved === "1" || info.userloved === 1 || info.userloved === true;
|
||||
fields.push({ name: "Loved", value: userLoved ? "❤️ Yes" : "🖤 No", inline: true });
|
||||
fields.push({
|
||||
name: `❤️ ${this.t(msg, "responses.lastfm.trackFieldLoved")}`,
|
||||
value: userLoved ? this.t(msg, "responses.lastfm.lovedStatusYes") : this.t(msg, "responses.lastfm.lovedStatusNo"),
|
||||
inline: true,
|
||||
});
|
||||
|
||||
if (info.toptags?.tag?.length) {
|
||||
const tagStr = info.toptags.tag.slice(0, 8).map(t => {
|
||||
@@ -329,34 +391,40 @@ export async function runInfoActions(msg, data, lastfm, prefix, userId, targetUs
|
||||
const tagLower = String(tagName).toLowerCase().replace(/\s+/g, "+");
|
||||
return `[${tagName}](https://www.last.fm/tag/${encodeURIComponent(tagLower)})`;
|
||||
}).join(" · ");
|
||||
fields.push({ name: "Tags", value: tagStr, inline: false });
|
||||
}
|
||||
|
||||
embed.addFields(...fields);
|
||||
|
||||
if (info.wiki?.summary) {
|
||||
const cleanSummary = info.wiki.summary.replace(/<[^>]*>/g, "").trim();
|
||||
if (cleanSummary.length > 0) {
|
||||
const truncated = cleanSummary.length > 200 ? cleanSummary.slice(0, 197) + "..." : cleanSummary;
|
||||
embed.setDescription(truncated);
|
||||
}
|
||||
fields.push({
|
||||
name: `🏷️ ${this.t(msg, "responses.lastfm.trackFieldTags")}`,
|
||||
value: tagStr,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
let similarTracks = [];
|
||||
try {
|
||||
similarTracks = await lastfm.getSimilarTracks(artistName, trackName, 5);
|
||||
similarTracks = await lastfm.getSimilarTracks(artistName, trackName, 4);
|
||||
} catch(e) { logger.warn("[LastFm] Error:", e?.message); }
|
||||
|
||||
if (similarTracks.length) {
|
||||
const simStr = similarTracks.map(t => {
|
||||
const matchPct = Math.round(t.match * 100);
|
||||
const link = t.url ? `[${t.name}](${t.url})` : t.name;
|
||||
return `${link} by **${t.artist}** (${matchPct}%)`;
|
||||
return `${link} — **${t.artist}** \`(${matchPct}% match)\``;
|
||||
}).join("\n");
|
||||
embed.addFields({ name: "Similar Tracks", value: simStr.slice(0, 1024), inline: false });
|
||||
fields.push({
|
||||
name: `✨ ${this.t(msg, "responses.lastfm.trackFieldSimilar")}`,
|
||||
value: simStr.slice(0, 1024),
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
embed.setFooter({ text: `Last.fm: ${user.username}` });
|
||||
embed.addFields(...fields);
|
||||
embed.setFooter({
|
||||
text: this.t(msg, "responses.lastfm.trackFooterPro", {
|
||||
prefix,
|
||||
user: user.username,
|
||||
track: info.name,
|
||||
artist: artistName,
|
||||
}),
|
||||
});
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -36,25 +36,32 @@ export const LISTENING_ACTIONS = new Set([
|
||||
* @param {function(string, object=): string} tr - Translator bound to the invoking message.
|
||||
* @param {boolean} [showPlaycount=false] - Whether to show play counts.
|
||||
* @param {string} [prefix="%"] - The command prefix for the footer hint.
|
||||
* @param {string|null} [authorName=null] - Optional author header text.
|
||||
* @returns {EmbedBuilder} The constructed embed.
|
||||
*/
|
||||
function buildTrackList(username, title, tracks, tr, showPlaycount = false, prefix = "%") {
|
||||
function buildTrackList(username, title, tracks, tr, showPlaycount = false, prefix = "%", authorName = null) {
|
||||
const lines = tracks.map((t, i) => {
|
||||
const num = String(i + 1).padStart(2, " ");
|
||||
const num = String(i + 1).padStart(2, "0");
|
||||
let name = t.name;
|
||||
if (name.length > 40) name = name.slice(0, 37) + "...";
|
||||
const link = t.url ? `[${name}](${t.url})` : name;
|
||||
const extra = showPlaycount && t.playcount ? ` (${t.playcount} ${tr("responses.lastfm.plays")})` : "";
|
||||
const extra = showPlaycount && t.playcount ? ` \`(${t.playcount} ${tr("responses.lastfm.plays")})\`` : "";
|
||||
return `\`${num}.\` ${link} — **${t.artist}**${extra}`;
|
||||
});
|
||||
|
||||
const desc = lines.join("\n").slice(0, 4096);
|
||||
|
||||
return new EmbedBuilder()
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(title) /* locale titles (lovedTitle/topTitle/recentTitle) already embed {{username}} */
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: tr("responses.lastfm.trackListFooter", { prefix }) });
|
||||
|
||||
if (authorName) {
|
||||
embed.setAuthor({ name: authorName });
|
||||
}
|
||||
|
||||
return embed;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,29 +77,43 @@ function buildTrackList(username, title, tracks, tr, showPlaycount = false, pref
|
||||
* @returns {EmbedBuilder} The constructed embed.
|
||||
*/
|
||||
function buildLeaderboardEmbed(lb, pageIdx, prefix, tr, opts = {}) {
|
||||
const MEDALS = ["🥇", "🥈", "🥉"];
|
||||
const startRank = pageIdx * lb.perPage;
|
||||
const requesterId = opts.requesterId ? String(opts.requesterId) : null;
|
||||
|
||||
const lines = lb.entries.map((entry, i) => {
|
||||
const rank = startRank + i + 1;
|
||||
const head = rank <= 3 ? `${MEDALS[rank - 1]} ` : "";
|
||||
const who = entry.userId ? `<@${entry.userId}>` : (entry.username || "?");
|
||||
const lfName = entry.username ? ` — *${entry.username}*` : "";
|
||||
const lfName = entry.username ? ` (*${entry.username}*)` : "";
|
||||
const marker = requesterId && String(entry.userId) === requesterId ? ` **${tr("responses.lastfm.leaderboardYou")}**` : "";
|
||||
const count = Utils.formatNumber(entry.scrobbleCount);
|
||||
return `${head}**${rank}.** ${who}${lfName} — **${count}** ${tr("responses.lastfm.leaderboardScrobbles")}${marker}`;
|
||||
|
||||
if (rank === 1) {
|
||||
return `🥇 **#1 ${tr("responses.lastfm.leaderboardChampion")}**\n> ${who}${lfName} — **${count}** ${tr("responses.lastfm.leaderboardScrobbles")}${marker}`;
|
||||
}
|
||||
if (rank === 2) {
|
||||
return `🥈 **#2** ${who}${lfName} — **${count}** ${tr("responses.lastfm.leaderboardScrobbles")}${marker}`;
|
||||
}
|
||||
if (rank === 3) {
|
||||
return `🥉 **#3** ${who}${lfName} — **${count}** ${tr("responses.lastfm.leaderboardScrobbles")}${marker}`;
|
||||
}
|
||||
const num = String(rank).padStart(2, "0");
|
||||
return `\`${num}.\` ${who}${lfName} — **${count}** ${tr("responses.lastfm.leaderboardScrobbles")}${marker}`;
|
||||
});
|
||||
|
||||
const desc = (lines.join("\n") + (opts.extraLine ? `\n\n${opts.extraLine}` : "")).slice(0, 4096);
|
||||
let desc = lines.join("\n\n");
|
||||
if (opts.extraLine) {
|
||||
desc += `\n\n────────────────────\n${opts.extraLine}`;
|
||||
}
|
||||
|
||||
const title = lb.scope === "server"
|
||||
? tr("responses.lastfm.leaderboardTitleServer")
|
||||
: tr("responses.lastfm.leaderboardTitleGlobal");
|
||||
|
||||
return new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: tr("responses.lastfm.leaderboardAuthorPro") })
|
||||
.setTitle(title)
|
||||
.setDescription(desc)
|
||||
.setDescription(desc.slice(0, 4096))
|
||||
.setFooter({ text: tr("responses.lastfm.leaderboardFooterSync", { prefix }) });
|
||||
}
|
||||
|
||||
@@ -130,7 +151,7 @@ export async function runListeningActions(msg, data, lastfm, prefix, userId, tar
|
||||
});
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.lovedTitle", { username: user.username }), tracks, tr, false, prefix)] });
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.lovedTitle", { username: user.username }), tracks, tr, false, prefix, tr("responses.lastfm.trackListAuthorLoved"))] });
|
||||
}
|
||||
|
||||
case "top": {
|
||||
@@ -155,7 +176,7 @@ export async function runListeningActions(msg, data, lastfm, prefix, userId, tar
|
||||
}
|
||||
|
||||
const periodLabel = period !== "overall" ? ` (${period})` : "";
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.topTitle", { username: user.username }) + periodLabel, tracks, tr, true, prefix)] });
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.topTitle", { username: user.username }) + periodLabel, tracks, tr, true, prefix, tr("responses.lastfm.trackListAuthorTop"))] });
|
||||
}
|
||||
|
||||
case "leaderboard":
|
||||
@@ -273,7 +294,7 @@ export async function runListeningActions(msg, data, lastfm, prefix, userId, tar
|
||||
});
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.recentTitle", { username: user.username }), tracks, tr, false, prefix)] });
|
||||
return msg.reply({ embeds: [buildTrackList(user.username, tr("responses.lastfm.recentTitle", { username: user.username }), tracks, tr, false, prefix, tr("responses.lastfm.trackListAuthorRecent"))] });
|
||||
}
|
||||
|
||||
case "artists": {
|
||||
@@ -299,7 +320,7 @@ export async function runListeningActions(msg, data, lastfm, prefix, userId, tar
|
||||
|
||||
const periodLabel = period !== "overall" ? ` (${period})` : "";
|
||||
const lines = artists.map((a, i) => {
|
||||
const num = String(i + 1).padStart(2, " ");
|
||||
const num = String(i + 1).padStart(2, "0");
|
||||
let name = a.name;
|
||||
if (name.length > 40) name = name.slice(0, 37) + "...";
|
||||
const link = a.url ? `[${name}](${a.url})` : name;
|
||||
@@ -311,7 +332,8 @@ export async function runListeningActions(msg, data, lastfm, prefix, userId, tar
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(tr("responses.lastfm.artistsTitle", { username: user.username }) + periodLabel)
|
||||
.setAuthor({ name: tr("responses.lastfm.artistsTitle", { username: user.username }) })
|
||||
.setTitle(`🎤 ${tr("responses.lastfm.artistsTitle", { username: user.username })}${periodLabel}`)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: tr("responses.lastfm.artistsFooter", { prefix }) })]
|
||||
});
|
||||
|
||||
@@ -109,9 +109,12 @@ export async function playLastFmCategory(ctx, msg, userId, category, options = {
|
||||
let statusMsg;
|
||||
try {
|
||||
statusMsg = await msg.reply({
|
||||
embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
`${categoryEmoji} Fetching your ${categoryLabel} tracks from Last.fm${resolveLabel}...`
|
||||
)]
|
||||
embeds: [new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setAuthor({ name: ctx.t(msg, "responses.lastfm.playDirectoryAuthor") })
|
||||
.setTitle(ctx.t(msg, "responses.lastfm.playLoadingTitle"))
|
||||
.setDescription(
|
||||
`${categoryEmoji} Fetching your ${categoryLabel} tracks from Last.fm${resolveLabel}...`
|
||||
)]
|
||||
});
|
||||
} catch (e) { logger.warn("[LastfmCmd] Error:", e?.message); statusMsg = null; }
|
||||
|
||||
@@ -128,9 +131,11 @@ export async function playLastFmCategory(ctx, msg, userId, category, options = {
|
||||
}
|
||||
|
||||
if (!result.tracks.length) {
|
||||
const noTracks = { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
`${categoryEmoji} No ${categoryLabel.toLowerCase()} tracks found for **${result.username}**.`
|
||||
)] };
|
||||
const noTracks = { embeds: [new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setAuthor({ name: ctx.t(msg, "responses.lastfm.playDirectoryAuthor") })
|
||||
.setDescription(
|
||||
`${categoryEmoji} No ${categoryLabel.toLowerCase()} tracks found for **${result.username}**.`
|
||||
)] };
|
||||
if (statusMsg) statusMsg.edit(noTracks).catch(() => msg.reply(noTracks));
|
||||
else msg.reply(noTracks);
|
||||
return;
|
||||
@@ -141,9 +146,18 @@ export async function playLastFmCategory(ctx, msg, userId, category, options = {
|
||||
|
||||
if (statusMsg) {
|
||||
statusMsg.edit({
|
||||
embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
`${categoryEmoji} Loading **${result.tracks.length}** ${categoryLabel.toLowerCase()} tracks from **${result.username}**${resolveLabel}...`
|
||||
)]
|
||||
embeds: [new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setAuthor({ name: ctx.t(msg, "responses.lastfm.playDirectoryAuthor") })
|
||||
.setTitle(ctx.t(msg, "responses.lastfm.playLoadingTitle"))
|
||||
.setDescription(
|
||||
ctx.t(msg, "responses.lastfm.playLoadingDesc", {
|
||||
emoji: categoryEmoji,
|
||||
count: result.tracks.length,
|
||||
category: categoryLabel.toLowerCase(),
|
||||
username: result.username,
|
||||
provider: resolveLabel,
|
||||
})
|
||||
)]
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
@@ -168,12 +182,17 @@ export async function playLastFmCategory(ctx, msg, userId, category, options = {
|
||||
}
|
||||
|
||||
const summary = [];
|
||||
if (added > 0) summary.push(`✅ Added **${added}** track${added !== 1 ? "s" : ""} to the queue`);
|
||||
if (failed > 0) summary.push(`⚠️ ${failed} track${failed !== 1 ? "s" : ""} couldn't be found`);
|
||||
if (added > 0) summary.push(`✅ ${ctx.t(msg, "responses.lastfm.playDoneAdded", { count: added })}`);
|
||||
if (failed > 0) summary.push(`⚠️ ${ctx.t(msg, "responses.lastfm.playDoneNotFound", { count: failed })}`);
|
||||
|
||||
const doneEmbed = { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(
|
||||
`${categoryEmoji} **${categoryLabel} Tracks — ${result.username}**\n${summary.join(" · ")}`
|
||||
)] };
|
||||
const doneEmbed = { embeds: [new EmbedBuilder().setColor(getGlobalColor())
|
||||
.setAuthor({ name: ctx.t(msg, "responses.lastfm.playDirectoryAuthor") })
|
||||
.setTitle(ctx.t(msg, "responses.lastfm.playDoneTitle"))
|
||||
.setDescription(
|
||||
`${categoryEmoji} **${categoryLabel} Tracks — ${result.username}**\n\n` +
|
||||
summary.join("\n")
|
||||
)
|
||||
.setFooter({ text: ctx.t(msg, "responses.lastfm.playDirectoryFooter", { prefix }) })] };
|
||||
|
||||
if (statusMsg) statusMsg.edit(doneEmbed).catch(() => msg.reply(doneEmbed));
|
||||
else msg.reply(doneEmbed);
|
||||
@@ -278,42 +297,33 @@ export async function runPlaybackActions(msg, data, lastfm, prefix, userId, targ
|
||||
|
||||
if (!parsed.category) {
|
||||
const lfProviderNote = parsed.showAllCategories && parsed.resolveProvider
|
||||
? `\n\n💡 \`${prefix}lastfm play ${parsed.resolveProvider}:<category>\` — Specify a category after the provider:`
|
||||
? `\n💡 \`${prefix}lastfm play ${parsed.resolveProvider}:<category>\``
|
||||
: "";
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder().setColor(ERROR_COLOR).setDescription([
|
||||
`❌ Usage: \`${prefix}lastfm play <category>\``,
|
||||
``,
|
||||
`**Categories:**`,
|
||||
`\`loved\` — Play your loved tracks`,
|
||||
`\`top\` — Play your top tracks`,
|
||||
`\`recent\` — Play your recent tracks`,
|
||||
`\`albums\` — Play your top albums`,
|
||||
`\`artists\` — Play your top artists' tracks`,
|
||||
`\`playlist <number>\` — Play a playlist (use \`${prefix}lastfm playlists\` to list)`,
|
||||
``,
|
||||
`**With a search provider (defaults to \`top\`):**`,
|
||||
`\`${prefix}lastfm play td\` or \`${prefix}lastfm play td:top\` — Play top tracks, search on Tidal`,
|
||||
`\`${prefix}lastfm play sp\` or \`${prefix}lastfm play sp:top\` — Play top tracks, search on Spotify`,
|
||||
`\`${prefix}lastfm play dz\` or \`${prefix}lastfm play dz:top\` — Play top tracks, search on Deezer`,
|
||||
`\`${prefix}lastfm play yt\` or \`${prefix}lastfm play yt:top\` — Play top tracks, search on YouTube`,
|
||||
``,
|
||||
`**Last.fm as resolve provider (all categories):**`,
|
||||
`\`${prefix}lastfm play lf:loved\` — Play loved tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:top\` — Play top tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:recent\` — Play recent tracks, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:albums\` — Play top albums, search on Last.fm`,
|
||||
`\`${prefix}lastfm play lf:artists\` — Play top artists, search on Last.fm`,
|
||||
``,
|
||||
`**Examples:**`,
|
||||
`\`${prefix}lastfm play loved\``,
|
||||
`\`${prefix}lastfm play td\``,
|
||||
`\`${prefix}lastfm play sp:top\``,
|
||||
`\`${prefix}lastfm play lf:loved\``,
|
||||
`\`${prefix}lastfm play playlist 1\``,
|
||||
lfProviderNote,
|
||||
].join("\n"))]
|
||||
});
|
||||
|
||||
const directoryEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.playDirectoryAuthor") })
|
||||
.setTitle(this.t(msg, "responses.lastfm.playDirectoryTitle"))
|
||||
.setDescription(
|
||||
`\`${prefix}lastfm play <category> [provider]\`\n\n` +
|
||||
`**${this.t(msg, "responses.lastfm.playDirectoryCollections")}:**\n` +
|
||||
`• \`loved\` — ${this.t(msg, "responses.lastfm.playCategoryLoved")}\n` +
|
||||
`• \`top\` — ${this.t(msg, "responses.lastfm.playCategoryTop")}\n` +
|
||||
`• \`recent\` — ${this.t(msg, "responses.lastfm.playCategoryRecent")}\n` +
|
||||
`• \`albums\` — ${this.t(msg, "responses.lastfm.playCategoryAlbums")}\n` +
|
||||
`• \`artists\` — ${this.t(msg, "responses.lastfm.playCategoryArtists")}\n` +
|
||||
`• \`playlist <num>\` — ${this.t(msg, "responses.lastfm.playCategoryPlaylist")}`
|
||||
)
|
||||
.addFields({
|
||||
name: `🌐 ${this.t(msg, "responses.lastfm.playDirectoryProviders")}`,
|
||||
value:
|
||||
"`sp` (Spotify) · `td` (Tidal) · `dz` (Deezer) · `yt` (YouTube) · `lf` (Last.fm)\n" +
|
||||
`*Examples:* \`${prefix}fm play loved\` · \`${prefix}fm play td:top\` · \`${prefix}fm play lf:loved\`${lfProviderNote}`,
|
||||
inline: false,
|
||||
})
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.playDirectoryFooter", { prefix }) });
|
||||
|
||||
return msg.reply({ embeds: [directoryEmbed] });
|
||||
}
|
||||
|
||||
return playLastFmCategory(this, msg, userId, parsed.category, {
|
||||
|
||||
+43
-26
@@ -75,39 +75,56 @@ export async function runTagActions(msg, data, lastfm, prefix, userId, targetUse
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(`🏷️ ${tagInfo.name}`)
|
||||
.setURL(tagInfo.url || undefined);
|
||||
|
||||
const fields = [];
|
||||
fields.push({ name: "Reach", value: Utils.formatNumber(tagInfo.reach), inline: true });
|
||||
fields.push({ name: "Total Taggings", value: Utils.formatNumber(tagInfo.count), inline: true });
|
||||
|
||||
if (topArtists.length) {
|
||||
const artistStr = topArtists.map((a, i) => {
|
||||
const link = a.url ? `[${a.name}](${a.url})` : a.name;
|
||||
return `${i + 1}. ${link} (**${Utils.formatNumber(a.playcount)}** ${this.t(msg, "responses.lastfm.plays")})`;
|
||||
}).join("\n");
|
||||
fields.push({ name: "Top Artists", value: artistStr.slice(0, 1024), inline: false });
|
||||
}
|
||||
|
||||
if (topTracks.length) {
|
||||
const trackStr = topTracks.map((t, i) => {
|
||||
const link = t.url ? `[${t.name}](${t.url})` : t.name;
|
||||
return `${i + 1}. ${link} by **${t.artist}**`;
|
||||
}).join("\n");
|
||||
fields.push({ name: "Top Tracks", value: trackStr.slice(0, 1024), inline: false });
|
||||
}
|
||||
|
||||
embed.addFields(...fields);
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.tagAuthor") })
|
||||
.setTitle(tagInfo.name)
|
||||
.setURL(tagInfo.url || undefined)
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.tagFooterPro", { tag: tagInfo.name }) });
|
||||
|
||||
if (tagInfo.summary) {
|
||||
const cleanSummary = tagInfo.summary.replace(/<[^>]*>/g, "").trim();
|
||||
if (cleanSummary.length > 0) {
|
||||
const truncated = cleanSummary.length > 300 ? cleanSummary.slice(0, 297) + "..." : cleanSummary;
|
||||
embed.setDescription(truncated);
|
||||
const truncated = cleanSummary.length > 280 ? cleanSummary.slice(0, 277) + "..." : cleanSummary;
|
||||
embed.setDescription(`> *${truncated}*`);
|
||||
}
|
||||
}
|
||||
|
||||
embed.addFields(
|
||||
{
|
||||
name: this.t(msg, "responses.lastfm.tagFieldReach"),
|
||||
value: `👥 **${Utils.formatNumber(tagInfo.reach)}**`,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: this.t(msg, "responses.lastfm.tagFieldTaggings"),
|
||||
value: `🏷️ **${Utils.formatNumber(tagInfo.count)}**`,
|
||||
inline: true
|
||||
}
|
||||
);
|
||||
|
||||
if (topArtists.length) {
|
||||
const artistStr = topArtists.slice(0, 5).map((a, i) => {
|
||||
const link = a.url ? `[${a.name}](${a.url})` : a.name;
|
||||
return `\`${i + 1}.\` ${link} (${Utils.formatNumber(a.playcount)} ${this.t(msg, "responses.lastfm.plays")})`;
|
||||
}).join(" · ");
|
||||
embed.addFields({
|
||||
name: this.t(msg, "responses.lastfm.tagFieldPillars"),
|
||||
value: artistStr.slice(0, 1024),
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
if (topTracks.length) {
|
||||
const trackStr = topTracks.slice(0, 5).map((t, i) => {
|
||||
const link = t.url ? `[${t.name}](${t.url})` : t.name;
|
||||
return `\`${i + 1}.\` ${link} — **${t.artist}**`;
|
||||
}).join("\n");
|
||||
embed.addFields({
|
||||
name: this.t(msg, "responses.lastfm.tagFieldTopTracks"),
|
||||
value: trackStr.slice(0, 1024),
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
@@ -192,25 +192,40 @@ export async function runWhoknowsActions(msg, data, lastfm, prefix, userId, targ
|
||||
});
|
||||
}
|
||||
|
||||
const pct = Math.min(100, Math.max(0, Math.round(comparison.matchPercentage ?? 0)));
|
||||
const filledBars = Math.round(pct / 10);
|
||||
const emptyBars = 10 - filledBars;
|
||||
const bar = "█".repeat(filledBars) + "░".repeat(emptyBars);
|
||||
|
||||
let level = "Low";
|
||||
if (pct >= 80) level = "Super";
|
||||
else if (pct >= 60) level = "High";
|
||||
else if (pct >= 40) level = "Medium";
|
||||
else if (pct >= 20) level = "Fair";
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(this.t(msg, "responses.lastfm.compareTitle"))
|
||||
.setDescription([
|
||||
`**${comparison.user1.username}** vs **${comparison.user2.username}**`,
|
||||
``,
|
||||
`📊 **${comparison.matchPercentage}%** match`,
|
||||
``,
|
||||
`👤 ${comparison.user1.username}: ${comparison.user1.totalArtists} top artists`,
|
||||
`👤 ${comparison.user2.username}: ${comparison.user2.totalArtists} top artists`,
|
||||
].join("\n"));
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.compareAuthor") })
|
||||
.setTitle(`${comparison.user1.username} & ${comparison.user2.username}`)
|
||||
.setDescription(
|
||||
`📊 **[${bar}] ${pct}% MATCH**\n` +
|
||||
`*${this.t(msg, "responses.lastfm.compareMeter", { level, score: pct })}*\n\n` +
|
||||
`👤 **${comparison.user1.username}**: ${Utils.formatNumber(comparison.user1.totalArtists)} artists · ` +
|
||||
`👤 **${comparison.user2.username}**: ${Utils.formatNumber(comparison.user2.totalArtists)} artists`
|
||||
)
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.compareFooterPro", { prefix }) });
|
||||
|
||||
if (comparison.commonArtists?.length) {
|
||||
const commonStr = comparison.commonArtists.slice(0, 15).map((a, i) => {
|
||||
const commonStr = comparison.commonArtists.slice(0, 10).map((a, i) => {
|
||||
const num = String(i + 1).padStart(2, " ");
|
||||
const link = a.url ? `[${a.name}](${a.url})` : a.name;
|
||||
return `\`${num}.\` ${link} (**${a.playcount}** ${this.t(msg, "responses.lastfm.plays")})`;
|
||||
return `\`${num}.\` ${link} — **${Utils.formatNumber(a.playcount)}** ${this.t(msg, "responses.lastfm.plays")}`;
|
||||
}).join("\n");
|
||||
embed.addFields({ name: `Common Artists (${comparison.commonArtists.length})`, value: commonStr.slice(0, 1024), inline: false });
|
||||
embed.addFields({
|
||||
name: `${this.t(msg, "responses.lastfm.compareFieldShared")} (${comparison.commonArtists.length})`,
|
||||
value: commonStr.slice(0, 1024),
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
@@ -340,22 +355,44 @@ export async function runWhoknowsActions(msg, data, lastfm, prefix, userId, targ
|
||||
filteredCrowns = crowns.slice(0, 10);
|
||||
}
|
||||
|
||||
const lines = filteredCrowns.slice(0, 20).map(c => {
|
||||
const link = c.artistUrl ? `[${c.artist}](${c.artistUrl})` : c.artist;
|
||||
const nextStr = c.nextBest ? ` (next: **${c.nextBest.username}** with ${Utils.formatNumber(c.nextBest.playcount)})` : "";
|
||||
return `👑 ${link} — **${Utils.formatNumber(c.userPlaycount)}** ${this.t(msg, "responses.lastfm.plays")}${nextStr}`;
|
||||
});
|
||||
|
||||
const desc = lines.join("\n").slice(0, 4096);
|
||||
const topCrown = filteredCrowns[0];
|
||||
const rest = filteredCrowns.slice(1, 15);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.lastfm.crownsAuthor") })
|
||||
.setTitle(this.t(msg, "responses.lastfm.crownsTitle", { username: user.username }))
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.crownsFooter", { count: filteredCrowns.length, plural: filteredCrowns.length !== 1 ? "s" : "" }) });
|
||||
.setFooter({ text: this.t(msg, "responses.lastfm.crownsFooterPro", { prefix }) });
|
||||
|
||||
if (filteredCrowns[0]?.image) {
|
||||
embed.setThumbnail(filteredCrowns[0].image);
|
||||
if (topCrown) {
|
||||
const topLink = topCrown.artistUrl ? `[${topCrown.artist}](${topCrown.artistUrl})` : topCrown.artist;
|
||||
let leadDesc = this.t(msg, "responses.lastfm.crownsUncontested");
|
||||
if (topCrown.nextBest && topCrown.nextBest.playcount > 0) {
|
||||
const lead = topCrown.userPlaycount - topCrown.nextBest.playcount;
|
||||
leadDesc = `${this.t(msg, "responses.lastfm.crownsLead", { lead: Utils.formatNumber(lead) })} · ${this.t(msg, "responses.lastfm.crownsRunnerUp", { user: topCrown.nextBest.username, plays: Utils.formatNumber(topCrown.nextBest.playcount) })}`;
|
||||
}
|
||||
embed.addFields({
|
||||
name: `👑 ${this.t(msg, "responses.lastfm.crownsMonopolyField")}`,
|
||||
value: `**${topLink}** — **${Utils.formatNumber(topCrown.userPlaycount)}** ${this.t(msg, "responses.lastfm.plays")}\n*${leadDesc}*`,
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
if (rest.length > 0) {
|
||||
const otherLines = rest.map(c => {
|
||||
const link = c.artistUrl ? `[${c.artist}](${c.artistUrl})` : c.artist;
|
||||
const runner = c.nextBest ? ` (${c.nextBest.username}: ${Utils.formatNumber(c.nextBest.playcount)})` : "";
|
||||
return `👑 ${link} — **${Utils.formatNumber(c.userPlaycount)}**${runner}`;
|
||||
});
|
||||
embed.addFields({
|
||||
name: `🏛️ ${this.t(msg, "responses.lastfm.crownsOtherField")} (${filteredCrowns.length})`,
|
||||
value: otherLines.join("\n").slice(0, 1024),
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
if (topCrown?.image) {
|
||||
embed.setThumbnail(topCrown.image);
|
||||
}
|
||||
|
||||
const replyPayload = { embeds: [embed] };
|
||||
|
||||
+3
-1
@@ -44,7 +44,9 @@ export async function run(message, data) {
|
||||
if (!current && totalTracks === 0) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setDescription(this.t(message, "responses.list.empty", { prefix }));
|
||||
.setAuthor({ name: this.t(message, "responses.list.queueTitle") })
|
||||
.setDescription(this.t(message, "responses.list.empty", { prefix }))
|
||||
.setFooter({ text: this.t(message, "responses.play.controlsHint", { prefix }) });
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ export async function run(message, data) {
|
||||
.setAuthor({ name: `${icon} ${this.t(message, "responses.loop.loopTitle")}` })
|
||||
.setTitle(badge)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: `Cycle: ${prefix}loop song • ${prefix}loop queue` });
|
||||
.setFooter({ text: this.t(message, "responses.loop.cycleFooter", { prefix }) });
|
||||
|
||||
if (current?.thumbnail) {
|
||||
embed.setThumbnail(current.thumbnail);
|
||||
|
||||
+7
-2
@@ -30,8 +30,14 @@ export async function run(message) {
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
const prefix = this.handler.getPrefix(message.message?.guildId ?? message.channel?.guildId) || "%";
|
||||
|
||||
if (p._paused) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(message, "responses.pause.alreadyPaused") || "Already paused!");
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `⏸️ ${this.t(message, "responses.pause.pausedTitle")}` })
|
||||
.setDescription(this.t(message, "responses.pause.alreadyPaused"))
|
||||
.setFooter({ text: this.t(message, "responses.pause.resumeHint", { prefix }) });
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -39,7 +45,6 @@ export async function run(message) {
|
||||
const elapsed = p.getCurrentElapsedDuration();
|
||||
const trackUrl = current.spotifyUrl || current.url || null;
|
||||
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
|
||||
const prefix = this.handler.getPrefix(message.message?.guildId ?? message.channel?.guildId) || "%";
|
||||
|
||||
let desc = trackUrl
|
||||
? `**[${Utils.truncate(current.title || this.t(message, "responses.play.unknownTrack"), 50)}](${trackUrl})**`
|
||||
|
||||
@@ -84,6 +84,7 @@ export function buildPlayerEmbed(bot, msg, player, timeout, state = {}) {
|
||||
|
||||
const builder = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: bot.t(msg, "responses.player.deckAuthor") })
|
||||
.setTitle(bot.t(msg, "responses.player.title"))
|
||||
.setDescription(description)
|
||||
.setFooter({
|
||||
|
||||
+24
-11
@@ -78,25 +78,38 @@ export async function openLyricsViewer(bot, msg, player, refresh, session) {
|
||||
let currentPage = 0;
|
||||
|
||||
const buildLyricsContent = (pageIdx, expired = false, closed = false) => {
|
||||
const title = Utils.truncate(
|
||||
player.queue.getCurrent()?.title?.replace(/\(Official.*?\)/gi, '').trim() ?? '',
|
||||
50
|
||||
);
|
||||
const current = player.queue.getCurrent();
|
||||
const rawTitle = current?.title?.replace(/\(Official.*?\)/gi, '').trim() ?? 'Unknown Track';
|
||||
const title = Utils.truncate(rawTitle, 50);
|
||||
const artist = current?.artist || (typeof current?.author === "object" ? current?.author?.name : current?.author) || "";
|
||||
const lyricsSource = lyricsResult.source || "Lyrics";
|
||||
const footerText = closed
|
||||
? `👋 Lyrics closed • ${lyricsSource} • ${totalLines} lines`
|
||||
: expired
|
||||
? `⌛ Controls expired • ${lyricsSource} • ${totalLines} lines`
|
||||
: `${lyricsSource} • ${totalLines} lines total${lyricsResult.synced ? ' • Synced' : ''}`;
|
||||
const headerLine = artist ? `by **${artist}**${syncBadge} • Page ${pageIdx + 1}/${totalPages}` : `Page ${pageIdx + 1}/${totalPages}${syncBadge}`;
|
||||
const desc = [
|
||||
`**${title}**${syncBadge} • Page ${pageIdx + 1}/${totalPages}`,
|
||||
``,
|
||||
'```',
|
||||
headerLine,
|
||||
"",
|
||||
"```",
|
||||
pages[pageIdx],
|
||||
totalPages > 1 && !expired && !closed ? `\n\n💡 ⬅️ ➡️ Navigate • ❌ Close` : '',
|
||||
'```'
|
||||
].join('\n');
|
||||
return { embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc).setFooter({ text: footerText })] };
|
||||
totalPages > 1 && !expired && !closed ? "\n\n💡 ⬅️ ➡️ Navigate • ❌ Close" : "",
|
||||
"```"
|
||||
].join("\n");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: "🎤 " + (bot.t(msg, "responses.lyrics.author") || "Lyrics") })
|
||||
.setTitle(title)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: footerText });
|
||||
|
||||
if (current?.thumbnail) {
|
||||
embed.setThumbnail(current.thumbnail);
|
||||
}
|
||||
|
||||
return { embeds: [embed] };
|
||||
};
|
||||
|
||||
session.activeLyricsMsg = await msg.reply(buildLyricsContent(0));
|
||||
|
||||
+7
-2
@@ -33,8 +33,14 @@ export async function run(message) {
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
const prefix = this.handler.getPrefix(message.message?.guildId ?? message.channel?.guildId) || "%";
|
||||
|
||||
if (!p._paused) {
|
||||
const embed = new EmbedBuilder().setColor(0xe9196c).setDescription(this.t(message, "responses.resume.alreadyPlaying") || "Already playing!");
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `▶️ ${this.t(message, "responses.resume.resumedTitle")}` })
|
||||
.setDescription(this.t(message, "responses.resume.notPaused"))
|
||||
.setFooter({ text: this.t(message, "responses.resume.pauseHint", { prefix }) });
|
||||
return message.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -42,7 +48,6 @@ export async function run(message) {
|
||||
const elapsed = p.getCurrentElapsedDuration();
|
||||
const trackUrl = current.spotifyUrl || current.url || null;
|
||||
const rawAuthor = current.artist || (typeof current.author === "object" ? current.author?.name : current.author);
|
||||
const prefix = this.handler.getPrefix(message.message?.guildId ?? message.channel?.guildId) || "%";
|
||||
|
||||
let desc = trackUrl
|
||||
? `**[${Utils.truncate(current.title || this.t(message, "responses.play.unknownTrack"), 50)}](${trackUrl})**`
|
||||
|
||||
@@ -46,7 +46,8 @@ export async function run(msg) {
|
||||
const g = guilds[i];
|
||||
let name = g.name || "unknown";
|
||||
if (name.length > 40) name = name.slice(0, 37) + "...";
|
||||
const line = `${i + 1}. **${name}** (\`${g.id}\`)`;
|
||||
const num = String(i + 1).padStart(2, "0");
|
||||
const line = `\`${num}.\` **${name}** \`(${g.id})\``;
|
||||
const addedLen = line.length + (currentLines.length ? 1 : 0);
|
||||
|
||||
if (currentLen + addedLen > MAX_DESC - 20 && currentLines.length > 0) {
|
||||
@@ -73,16 +74,16 @@ export async function run(msg) {
|
||||
const buildPageContent = (pageIdx, expired = false) => {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setTitle(this.t(msg, "responses.servers.pageTitle", { count: guilds.length, page: pageIdx + 1, total: totalPages }))
|
||||
.setAuthor({ name: this.t(msg, "responses.servers.serversAuthor") })
|
||||
.setTitle(this.t(msg, "responses.servers.serversTitle"))
|
||||
.setDescription(pages[pageIdx])
|
||||
.setFooter({
|
||||
text: expired
|
||||
? this.t(msg, "responses._common.controlsExpired")
|
||||
: totalPages > 1
|
||||
? this.t(msg, "responses._common.navigateHint")
|
||||
? this.t(msg, "responses.servers.serversTelemetryFooter", { page: pageIdx + 1, total: totalPages })
|
||||
: this.t(msg, "responses.servers.listComplete")
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
return { embeds: [embed] };
|
||||
};
|
||||
|
||||
+61
-22
@@ -273,15 +273,31 @@ export async function run(message, data) {
|
||||
|
||||
if (cmd === "helpSettings") {
|
||||
if (!settingKey) {
|
||||
const keys = this.settingsMgr.getPublicKeys();
|
||||
const keyList = keys.map(k => "`" + k + "`").join(", ");
|
||||
return message.reply(embed(
|
||||
this.t(message, "responses.settings.helpTitle") + "\n\n" +
|
||||
this.t(message, "responses.settings.helpAvailable", { settings: keyList }) + "\n\n" +
|
||||
this.t(message, "responses.settings.helpSubcommands", { prefix }) + "\n\n" +
|
||||
this.t(message, "responses.settings.helpShortcuts", { prefix }),
|
||||
{ title: "\u2699\ufe0f Settings Help" }
|
||||
));
|
||||
const keys = this.settingsMgr.getPublicKeys();
|
||||
const keyTags = keys.map(k => "`" + k + "`").join(" ");
|
||||
const handbookEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(message, "responses.settings.handbookAuthor") })
|
||||
.setTitle(this.t(message, "responses.settings.handbookTitle"))
|
||||
.setDescription(this.t(message, "responses.settings.handbookDesc"))
|
||||
.addFields(
|
||||
{
|
||||
name: `📋 ${this.t(message, "responses.settings.handbookParamsField")}`,
|
||||
value: keyTags,
|
||||
inline: false,
|
||||
},
|
||||
{
|
||||
name: `⚡ ${this.t(message, "responses.settings.handbookOpsField")}`,
|
||||
value:
|
||||
`• \`${prefix}settings get\` — ${this.t(message, "responses.settings.handbookOpGet")}\n` +
|
||||
`• \`${prefix}settings set <key> <val>\` — ${this.t(message, "responses.settings.handbookOpSet")}\n` +
|
||||
`• \`${prefix}settings reset <key>\` — ${this.t(message, "responses.settings.handbookOpReset")}\n` +
|
||||
`• \`${prefix}settings help <key>\` — ${this.t(message, "responses.settings.handbookOpHelp")}`,
|
||||
inline: false,
|
||||
}
|
||||
)
|
||||
.setFooter({ text: `${this.t(message, "responses.settings.handbookShortcutsField")}: ${prefix}247 · ${prefix}volume · ${prefix}prefix` });
|
||||
return message.reply({ embeds: [handbookEmbed] });
|
||||
}
|
||||
|
||||
const rawDescription = this.settingsMgr.descriptions?.[settingKey] ?? this.t(message, "responses.settings.noDescription");
|
||||
@@ -289,24 +305,47 @@ export async function run(message, data) {
|
||||
const currentVal = set.get(settingKey);
|
||||
const defaultVal = this.settingsMgr.defaults?.[settingKey];
|
||||
|
||||
let extra = "";
|
||||
let rangeInfo = "";
|
||||
if (settingKey === "locale") {
|
||||
extra = "\n**Valid values:** " + [...VALID_LOCALES].map(l => "`" + l + "`").join(", ");
|
||||
rangeInfo = [...VALID_LOCALES].map(l => "`" + l + "`").join(", ");
|
||||
} else if (settingKey === "volume") {
|
||||
extra = "\n**Valid range:** " + VOLUME_MIN + "\u2013" + VOLUME_MAX;
|
||||
rangeInfo = `${VOLUME_MIN} – ${VOLUME_MAX}`;
|
||||
} else if (BOOL_SETTINGS.has(settingKey)) {
|
||||
extra = "\n**Valid values:** `true`, `false`, `on`, `off`";
|
||||
rangeInfo = "`true`, `false`, `on`, `off`";
|
||||
} else if (settingKey === "stay_247") {
|
||||
extra = "\n**Usage:** Join a voice channel and use `247` to toggle.\n\nThe bot stays in that channel and auto-rejoins if disconnected.";
|
||||
rangeInfo = `${prefix}247`;
|
||||
}
|
||||
|
||||
const label = prettifySettingLabel(settingKey, t247, guildId);
|
||||
return message.reply(embed(
|
||||
"**\u2699\ufe0f Setting: `" + settingKey + "`**\n\n" +
|
||||
description + extra + "\n\n" +
|
||||
"**Current value:** " + displayValue(settingKey, currentVal) + "\n" +
|
||||
"**Default:** " + displayValue(settingKey, defaultVal),
|
||||
{ title: "\u2699\ufe0f " + settingKey }
|
||||
));
|
||||
const inspectorEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(message, "responses.settings.inspectorTitle") })
|
||||
.setTitle(`⚙️ \`${settingKey}\``)
|
||||
.setDescription(description)
|
||||
.addFields(
|
||||
{
|
||||
name: `📌 ${this.t(message, "responses.settings.settingValueField")}`,
|
||||
value: displayValue(settingKey, currentVal),
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `🏷️ ${this.t(message, "responses.settings.settingDefaultField")}`,
|
||||
value: displayValue(settingKey, defaultVal),
|
||||
inline: true,
|
||||
}
|
||||
);
|
||||
|
||||
if (rangeInfo) {
|
||||
inspectorEmbed.addFields({
|
||||
name: `🎯 ${this.t(message, "responses.settings.settingRangeField")}`,
|
||||
value: rangeInfo,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
inspectorEmbed.setFooter({
|
||||
text: this.t(message, "responses.settings.inspectorFooter", { prefix, setting: settingKey }),
|
||||
});
|
||||
|
||||
return message.reply({ embeds: [inspectorEmbed] });
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@
|
||||
*/
|
||||
|
||||
|
||||
import { cleanId, getMessageGuildId } from "../../src/ui/index.mjs";
|
||||
import { cleanId, getMessageGuildId, getGlobalColor } from "../../src/ui/index.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import runnables from "../../settings/runnables.mjs";
|
||||
import {
|
||||
parseBool, displayValue, getGuildName, embed, tWrap, prettifySettingLabel,
|
||||
@@ -109,7 +110,30 @@ export async function handleShortcut(ctx, message, settingKey, valueTokens) {
|
||||
}
|
||||
const val = set.get(settingKey);
|
||||
const label = prettifySettingLabel(settingKey, t247, guildId);
|
||||
return message.reply(embed("**" + label + "**\nValue: " + displayValue(settingKey, val)));
|
||||
const defaultVal = ctx.settingsMgr?.defaults?.[settingKey];
|
||||
const shortcutEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: ctx.t(message, "responses.settings.shortcutAuthor") })
|
||||
.setTitle(`⚙️ \`${settingKey}\` — ${label}`)
|
||||
.addFields(
|
||||
{
|
||||
name: `📌 ${ctx.t(message, "responses.settings.shortcutValueField")}`,
|
||||
value: displayValue(settingKey, val),
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `🏷️ ${ctx.t(message, "responses.settings.shortcutDefaultField")}`,
|
||||
value: displayValue(settingKey, defaultVal),
|
||||
inline: true,
|
||||
}
|
||||
)
|
||||
.setFooter({
|
||||
text: ctx.t(message, "responses.settings.shortcutHintFooter", {
|
||||
prefix: ctx.handler?.getPrefix(guildId) ?? "%",
|
||||
shortcut: settingKey,
|
||||
}),
|
||||
});
|
||||
return message.reply({ embeds: [shortcutEmbed] });
|
||||
}
|
||||
|
||||
const rawValue = valueTokens.join(" ");
|
||||
|
||||
@@ -54,7 +54,7 @@ export async function run(message) {
|
||||
.setColor(0xe9196c)
|
||||
.setAuthor({ name: `🔀 ${this.t(message, "responses.shuffle.shuffledTitle")}` })
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: `${prefix}queue to view full order` });
|
||||
.setFooter({ text: this.t(message, "responses.shuffle.viewOrderFooter", { prefix }) });
|
||||
|
||||
if (nextTrack?.thumbnail) {
|
||||
embed.setThumbnail(nextTrack.thumbnail);
|
||||
|
||||
+34
-8
@@ -200,6 +200,8 @@ export async function run(msg, data) {
|
||||
if (current.thumbnail) setEmbed.setThumbnail(current.thumbnail);
|
||||
if (result.alias !== DEFAULT_ALIAS) {
|
||||
setEmbed.setFooter({ text: this.t(msg, "responses.trackopt.playHintFooter", { prefix, alias: result.alias }) });
|
||||
} else {
|
||||
setEmbed.setFooter({ text: this.t(msg, "responses.trackopt.autoApplyFooter", { prefix }) });
|
||||
}
|
||||
|
||||
return msg.reply({ embeds: [setEmbed] });
|
||||
@@ -275,7 +277,8 @@ export async function run(msg, data) {
|
||||
.setAuthor({ name: this.t(msg, "responses.trackopt.appliedAuthor") })
|
||||
.setTitle(current.title?.slice(0, 256) || "Track Trim")
|
||||
.setDescription(this.t(msg, "responses.trackopt.applied", { alias: aliasLabel, start: Utils.prettifyMS(result.startMs), end: endStr }))
|
||||
.addFields({ name: this.t(msg, "responses.trackopt.activeCutRangeField"), value: timeline, inline: false });
|
||||
.addFields({ name: this.t(msg, "responses.trackopt.activeCutRangeField"), value: timeline, inline: false })
|
||||
.setFooter({ text: this.t(msg, "responses.trackopt.playFooterHint", { prefix }) });
|
||||
|
||||
if (current.thumbnail) playEmbed.setThumbnail(current.thumbnail);
|
||||
|
||||
@@ -302,19 +305,35 @@ export async function run(msg, data) {
|
||||
p._clearTrackEndTimer();
|
||||
}
|
||||
}
|
||||
if (aliasRaw) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.trackopt.removedAlias", { alias: aliasRaw, title: current.title }))] });
|
||||
}
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.trackopt.removedAll", { title: current.title }))] });
|
||||
const removeDesc = aliasRaw
|
||||
? this.t(msg, "responses.trackopt.removedAlias", { alias: aliasRaw, title: current.title })
|
||||
: this.t(msg, "responses.trackopt.removedAll", { title: current.title });
|
||||
|
||||
const removeEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.trackopt.removeAuthor") })
|
||||
.setTitle(current.title?.slice(0, 256) || "Track Trim")
|
||||
.setDescription(removeDesc)
|
||||
.setFooter({ text: this.t(msg, "responses.trackopt.removeFooter", { prefix }) });
|
||||
|
||||
if (current.thumbnail) removeEmbed.setThumbnail(current.thumbnail);
|
||||
|
||||
return msg.reply({ embeds: [removeEmbed] });
|
||||
}
|
||||
|
||||
if (subCommand === "list") {
|
||||
const rows = await trackOpts.list(userId);
|
||||
if (!rows || rows.length === 0) {
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(this.t(msg, "responses.trackopt.listEmpty", { prefix }))] });
|
||||
const emptyEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.trackopt.listAuthor") })
|
||||
.setTitle(this.t(msg, "responses.trackopt.listTitleClean", { count: 0 }))
|
||||
.setDescription(this.t(msg, "responses.trackopt.listEmpty", { prefix }))
|
||||
.setFooter({ text: this.t(msg, "responses.trackopt.listFooterHint", { prefix }) });
|
||||
return msg.reply({ embeds: [emptyEmbed] });
|
||||
}
|
||||
|
||||
let desc = this.t(msg, "responses.trackopt.listTitle", { count: rows.length }) + "\n\n";
|
||||
let desc = "";
|
||||
let lastTrack = "";
|
||||
for (const row of rows) {
|
||||
const title = row.track_title || row.track_identifier;
|
||||
@@ -330,6 +349,13 @@ export async function run(msg, data) {
|
||||
}
|
||||
desc += "\n" + this.t(msg, "responses.trackopt.listHint", { prefix });
|
||||
|
||||
return msg.reply({ embeds: [new EmbedBuilder().setColor(getGlobalColor()).setDescription(desc)] });
|
||||
const listEmbed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.trackopt.listAuthor") })
|
||||
.setTitle(this.t(msg, "responses.trackopt.listTitleClean", { count: rows.length }))
|
||||
.setDescription(desc.trim())
|
||||
.setFooter({ text: this.t(msg, "responses.trackopt.listFooterHint", { prefix }) });
|
||||
|
||||
return msg.reply({ embeds: [listEmbed] });
|
||||
}
|
||||
}
|
||||
+5
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
import { CommandBuilder } from "../src/commands/index.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { MAX_VOLUME } from "../src/utils/UI.mjs";
|
||||
import { MAX_VOLUME, ERROR_COLOR } from "../src/utils/UI.mjs";
|
||||
|
||||
/**
|
||||
* @type {CommandBuilder}
|
||||
@@ -60,8 +60,10 @@ export async function run(message, data) {
|
||||
const pct = Number(raw);
|
||||
if (pct < 0 || pct > MAX_VOLUME) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(0xe9196c)
|
||||
.setDescription(this.t(message, "responses.volume.outOfRange", { max: MAX_VOLUME }));
|
||||
.setColor(ERROR_COLOR)
|
||||
.setAuthor({ name: `🔊 ${this.t(message, "responses.volume.volumeAdjusted")}` })
|
||||
.setDescription(this.t(message, "responses.volume.outOfRange", { max: MAX_VOLUME }))
|
||||
.setFooter({ text: this.t(message, "responses.volume.volumeHint", { prefix }) });
|
||||
return message.reply({ embeds: [embed] }).catch(() => {});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { CommandBuilder } from "../src/commands/index.mjs";
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../src/ui/index.mjs";
|
||||
import { PermissionFlags } from "@fluxerjs/core";
|
||||
import { MAX_VOLUME } from "../src/utils/UI.mjs";
|
||||
import { MAX_VOLUME, ERROR_COLOR } from "../src/utils/UI.mjs";
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -64,11 +64,11 @@ export async function run(message, data) {
|
||||
const raw = volOption?.value;
|
||||
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor());
|
||||
const pfx = this.handler.getPrefix(message.channel?.guildId ?? message.message?.guildId);
|
||||
|
||||
if (!volOption || raw === null || raw === undefined || isNaN(Number(raw))) {
|
||||
const currentDefault = set?.get("volume") ?? 100;
|
||||
const currentPlayerVol = Math.round((p.preferredVolume ?? 1) * 100);
|
||||
const pfx = this.handler.getPrefix(message.channel?.guildId ?? message.message?.guildId);
|
||||
embed
|
||||
.setAuthor({ name: this.t(message, "responses.volumedefault.author") })
|
||||
.setTitle(this.t(message, "responses.volumedefault.title"))
|
||||
@@ -80,20 +80,30 @@ export async function run(message, data) {
|
||||
.addFields(
|
||||
{ name: this.t(message, "responses.volumedefault.fieldDefault"), value: buildVolumeSlider(currentDefault), inline: false },
|
||||
{ name: this.t(message, "responses.volumedefault.fieldActive"), value: `${currentPlayerVol}%`, inline: true }
|
||||
);
|
||||
)
|
||||
.setFooter({ text: this.t(message, "responses.volumedefault.footerHint", { prefix: pfx, max: MAX_VOLUME }) });
|
||||
} else if (!hasManage) {
|
||||
embed.setDescription(this.t(message, "responses.volumedefault.noPermissionSet"));
|
||||
embed
|
||||
.setColor(ERROR_COLOR)
|
||||
.setAuthor({ name: this.t(message, "responses.volumedefault.author") })
|
||||
.setDescription(this.t(message, "responses.volumedefault.noPermissionSet"))
|
||||
.setFooter({ text: this.t(message, "responses.volumedefault.footerHint", { prefix: pfx, max: MAX_VOLUME }) });
|
||||
} else {
|
||||
const pct = Number(raw);
|
||||
if (pct < 0 || pct > MAX_VOLUME) {
|
||||
embed.setDescription(this.t(message, "responses.volumedefault.outOfRange", { max: MAX_VOLUME }));
|
||||
embed
|
||||
.setColor(ERROR_COLOR)
|
||||
.setAuthor({ name: this.t(message, "responses.volumedefault.author") })
|
||||
.setDescription(this.t(message, "responses.volumedefault.outOfRange", { max: MAX_VOLUME }))
|
||||
.setFooter({ text: this.t(message, "responses.volumedefault.footerHint", { prefix: pfx, max: MAX_VOLUME }) });
|
||||
} else {
|
||||
p.setVolume(pct / 100);
|
||||
if (set) set.set("volume", pct);
|
||||
embed
|
||||
.setAuthor({ name: this.t(message, "responses.volumedefault.authorSaved") })
|
||||
.setDescription(this.t(message, "responses.volumedefault.saved", { volume: pct }))
|
||||
.addFields({ name: this.t(message, "responses.volumedefault.fieldNewDefault"), value: buildVolumeSlider(pct), inline: false });
|
||||
.addFields({ name: this.t(message, "responses.volumedefault.fieldNewDefault"), value: buildVolumeSlider(pct), inline: false })
|
||||
.setFooter({ text: this.t(message, "responses.volumedefault.footerHint", { prefix: pfx, max: MAX_VOLUME }) });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+24
-13
@@ -112,6 +112,7 @@ function buildVotersEmbed(voters, total, page, limit, type, resourceId, expired
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: t(guildId, "responses.vote.voteVotersAuthor") })
|
||||
.setTitle(`${title}`)
|
||||
.setDescription(desc)
|
||||
.setFooter({ text: footerText });
|
||||
@@ -146,8 +147,10 @@ export async function run(msg, data) {
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.vote.voteAuthor") })
|
||||
.setTitle(this.t(msg, "responses.vote.infoTitle"))
|
||||
.setDescription(this.t(msg, "responses.vote.infoDescription", { siteUrl: FLUXERLIST.SITE_URL, prefix }))]
|
||||
.setDescription(this.t(msg, "responses.vote.infoDescription", { siteUrl: FLUXERLIST.SITE_URL, prefix }))
|
||||
.setFooter({ text: this.t(msg, "responses.vote.voteFooterHint", { prefix }) })]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -169,10 +172,10 @@ export async function run(msg, data) {
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: "🗳️ Vote for Remix" })
|
||||
.setAuthor({ name: this.t(msg, "responses.vote.voteAuthor") })
|
||||
.setTitle(this.t(msg, "responses.vote.voteTitle"))
|
||||
.setDescription(descLines.join("\n"))
|
||||
.setFooter({ text: `Check your vote status: ${prefix}vote check • %voters` });
|
||||
.setFooter({ text: this.t(msg, "responses.vote.voteFooterHint", { prefix }) });
|
||||
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
@@ -192,16 +195,21 @@ export async function run(msg, data) {
|
||||
const resolvedType = type || "bot";
|
||||
const voted = await fluxerlist.hasVoted(userId);
|
||||
|
||||
const embed = new EmbedBuilder().setColor(getGlobalColor());
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.vote.voteCheckAuthor") })
|
||||
.setTitle(this.t(msg, "responses.vote.voteCheckTitle"));
|
||||
|
||||
if (voted === null) {
|
||||
embed.setDescription(this.t(msg, "responses.vote.checkUnknown"));
|
||||
} else if (voted) {
|
||||
embed.setDescription(this.t(msg, "responses.vote.checkYes", { type: resolvedType }));
|
||||
embed.setDescription(this.t(msg, "responses.vote.voteCheckYesDesc", { type: resolvedType }));
|
||||
} else {
|
||||
const slug = resourceId || (resolvedType === "server" ? fluxerlist.serverSlug : fluxerlist.botSlug);
|
||||
const voteUrl = slug ? buildVoteLink(resolvedType, slug) : FLUXERLIST.SITE_URL;
|
||||
embed.setDescription(this.t(msg, "responses.vote.checkNo", { type: resolvedType, url: voteUrl }));
|
||||
embed.setDescription(this.t(msg, "responses.vote.voteCheckNoDesc", { type: resolvedType, url: voteUrl }));
|
||||
}
|
||||
embed.setFooter({ text: this.t(msg, "responses.vote.voteCheckFooter", { prefix }) });
|
||||
return msg.reply({ embeds: [embed] });
|
||||
}
|
||||
|
||||
@@ -256,7 +264,7 @@ export async function run(msg, data) {
|
||||
const replyMsg = await msg.reply(buildPage(currentPage, voterData));
|
||||
if (!replyMsg?.message) return;
|
||||
|
||||
const navEmojis = ["\u25C0\uFE0F", "\u25B6\uFE0F", "\u274C"];
|
||||
const navEmojis = ["◀️", "▶️", "❌"];
|
||||
for (const emoji of navEmojis) {
|
||||
await replyMsg.message.react(emoji).catch(() => {});
|
||||
}
|
||||
@@ -292,7 +300,7 @@ export async function run(msg, data) {
|
||||
};
|
||||
|
||||
const unobserve = replyMsg.onReaction(navEmojis, async (e) => {
|
||||
if (e.emoji_id === "\u274C") {
|
||||
if (e.emoji_id === "❌") {
|
||||
clearTimeout(emojiTimeout);
|
||||
unobserve?.();
|
||||
await replyMsg.message.delete().catch(() => {});
|
||||
@@ -301,9 +309,9 @@ export async function run(msg, data) {
|
||||
|
||||
resetTimer();
|
||||
|
||||
if (e.emoji_id === "\u25C0\uFE0F") {
|
||||
if (e.emoji_id === "◀️") {
|
||||
currentPage = currentPage > 1 ? currentPage - 1 : totalPages;
|
||||
} else if (e.emoji_id === "\u25B6\uFE0F") {
|
||||
} else if (e.emoji_id === "▶️") {
|
||||
currentPage = currentPage < totalPages ? currentPage + 1 : 1;
|
||||
}
|
||||
|
||||
@@ -325,14 +333,17 @@ export async function run(msg, data) {
|
||||
return msg.reply({
|
||||
embeds: [new EmbedBuilder()
|
||||
.setColor(getGlobalColor())
|
||||
.setAuthor({ name: this.t(msg, "responses.vote.voteAuthor") })
|
||||
.setTitle(this.t(msg, "responses.vote.defaultTitle"))
|
||||
.setDescription([
|
||||
this.t(msg, "responses.vote.defaultCommandsTitle"),
|
||||
``,
|
||||
"",
|
||||
this.t(msg, "responses.vote.defaultCommandsList", { prefix }),
|
||||
``,
|
||||
"",
|
||||
this.t(msg, "responses.vote.optionsTitle"),
|
||||
this.t(msg, "responses.vote.optionsList", { prefix }),
|
||||
].join("\n"))]
|
||||
].join("\n"))
|
||||
.setFooter({ text: this.t(msg, "responses.vote.voteFooterHint", { prefix }) })]
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user