paginated to debug.mjs

This commit is contained in:
NoLogicAlan committed 2026-05-09 16:54:09 +03:00
1 parent 3f5c395986
commit c8a6469025
5 files changed
+239 -50

No files matched your search

+5 -2
View File
@@ -51,13 +51,16 @@ export async function run(msg, data) {
let desc = "";
for (const [channelId, total] of channelCounts) {
const name = await getChannelName(channelId);
desc += this.t(msg, "responses.test.channelEntry", { name, count: total });
const entry = this.t(msg, "responses.test.channelEntry", { name, count: total });
// Guard against 4096-char embed description limit
if (desc.length + entry.length > 4080) break;
desc += entry;
}
const embed = new EmbedBuilder()
.setColor(getGlobalColor())
.setTitle(this.t(msg, "responses.test.title"))
.setDescription(desc.trim())
.setDescription(desc.trim().slice(0, 4096))
;
msg.reply({ embeds: [embed] });
}