hybridize
This commit is contained in:
parent
cac9ff8db0
commit
c51a3be091
1 changed files with 20 additions and 0 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue