forgot to push it lmaoooooo is like 3 days

This commit is contained in:
NoLogicAlan committed 2026-04-16 16:01:18 +03:00
1 parent 6341f4e68f
commit 47b1615cbc
9 files changed
+136 -67

No files matched your search

+10 -3
View File
@@ -118,15 +118,22 @@ export async function run(msg) {
`⏱️ Session expires in ${Math.ceil(timeout / 60000)}m of inactivity`
].join("\n");
// avatarURL may be a plain property (Fluxer) or a method— call it if
// it's a function, otherwise use it as-is so the footer icon works in both cases.
const avatarUrl = typeof msg.author?.avatarURL === "function"
? msg.author.avatarURL()
: msg.author?.avatarURL ?? null;
const builder = new EmbedBuilder()
.setColor(getGlobalColor())
.setTitle("🎧 Music Player Controls")
.setDescription(description)
.setFooter({
text: `Requested by ${msg.author?.username || "Unknown"} • Controls active`,
iconURL: msg.author?.avatarURL
})
.setTimestamp();
iconURL: avatarUrl
});
// setTimestamp() is not verified on @fluxerjs/core's EmbedBuilder — guard it.
if (typeof builder.setTimestamp === "function") builder.setTimestamp();
if (current?.thumbnail) builder.setThumbnail(current.thumbnail);
return builder.toJSON();
};
+6 -1
View File
@@ -434,7 +434,12 @@ export async function run(message, data) {
// List all settings
const d = set.getAll();
const guildName = getGuildName(message);
const iconUrl = message.message?.guild?.iconURL?.() ?? null;
// Use the Fluxer CDN raw property pattern (guild.icon is a hash string, not a URL).
// guild.iconURL() is a method that does not exist on @fluxerjs/core Guild objects.
const rawGuild = message.message?.guild;
const iconUrl = rawGuild?.icon
? `https://cdn.fluxer.app/icons/${rawGuild.id}/${rawGuild.icon}.webp`
: null;
const lines = Object.entries(d)
.filter(([k]) => k !== "stay_247_mode") // surfaced inline with stay_247
+15 -22
View File
@@ -12,25 +12,16 @@ export const command = new CommandBuilder()
// ── User count ────────────────────────────────────────────────────────────────
async function fetchUserCount(client) {
const guildIds = Array.from(client.guilds.cache.keys());
if (guildIds.length === 0) return 0;
// client.rest is a concept and is not available on @fluxerjs/core.
// Use guild.memberCount (a cached integer Fluxer exposes on every Guild object)
// instead of paginating the REST members endpoint.
// Falls back to 0 per guild if the property is absent so the stat still renders.
try {
const counts = await Promise.all(guildIds.map(async (id) => {
let total = 0, after = "0", done = false;
try {
while (!done) {
const batch = await client.rest?.get(`/guilds/${id}/members?limit=1000&after=${after}`);
if (!batch?.length) { done = true; }
else {
total += batch.length;
done = batch.length < 1000;
if (!done) after = batch[batch.length - 1].user.id;
}
}
return total;
} catch { return 0; }
}));
return counts.reduce((a, b) => a + b, 0);
let total = 0;
for (const guild of client.guilds.cache.values()) {
total += guild.memberCount ?? guild.member_count ?? 0;
}
return total;
} catch { return 0; }
}
@@ -53,13 +44,15 @@ function buildEmbed({ guildCount, userCount, playerCount, ping, uptime, comHash,
`💬 [Community](https://fluxer.gg/Remix)`,
].filter(l => l !== null).join("\n");
return new EmbedBuilder()
const builder = new EmbedBuilder()
.setColor(getGlobalColor())
.setAuthor({ name: "Remix Music Bot" })
.setDescription(description)
.setFooter({ text: footer || "Remix Music Bot" })
.setTimestamp()
.toJSON();
.setFooter({ text: footer || "Remix Music Bot" });
// setTimestamp() is not verified on @fluxerjs/core's EmbedBuilder — call it only
// if the method exists so the command doesn't throw when building the embed.
if (typeof builder.setTimestamp === "function") builder.setTimestamp();
return builder.toJSON();
}
// ── Runner ────────────────────────────────────────────────────────────────────