From c51a3be091e3eb26dd66772c844e045dad054787 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Fri, 18 Apr 2025 11:54:41 -0600 Subject: [PATCH] hybridize --- src/util/misc.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/util/misc.js b/src/util/misc.js index d0cb817..be35ac1 100644 --- a/src/util/misc.js +++ b/src/util/misc.js @@ -180,6 +180,26 @@ function formatGuildFeatures(features) { function makeGuildFeatureFields(features) { const fields = []; if (features.length > 0) { + const left = features.slice(0, Math.ceil(features.length / 2)).join("\n"); + const right = features.slice(Math.ceil(features.length / 2), features.length).join("\n"); + + if (left.length < 1025 && right.length < 1025) { + fields.push( + { + name: `Features (${features.length})`, + value: left, + inline: true, + }, + { + name: `\u200b`, + value: right, + inline: true, + } + ); + + return fields; + } + let featuresList = ""; let firstFeature = true; for (let index = 0; index < features.length; index++) {