From 5117f101e8fb06c58e89e0114b38dbd055ee5c38 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 14 Sep 2023 23:22:27 -0600 Subject: [PATCH] utility.linvite: sort features --- src/modules/utility.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index d0a797c..02b3093 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -49,13 +49,6 @@ const CUSTOM_EMOTE_REGEX = /<(?:\u200b|&)?(a)?:(\w+):(\d+)>/; const NOWPLAYING_BAR_LENGTH = 30; -const STATUS_ICONS = { - online: "<:online:493173082421461002>", - idle: "<:idle:493173082006093836>", - dnd: "<:dnd:493173082261815307>", - offline: "<:offline:493173082253426688>", -}; - const PRESENCE_ICONS = { desktop: { online: "<:desktop_online:1028887024670871552>", @@ -551,7 +544,7 @@ lookupinvite.callback = async function (msg, line) { } : null; - const features = invite.guild.features.map( + const features = invite.guild.features.sort().map( (feature) => (GUILD_FEATURES[feature]?.icon ?? "\u2753") + " " + @@ -583,7 +576,7 @@ lookupinvite.callback = async function (msg, line) { expires, { name: "Member Count", - value: `${STATUS_ICONS.online}${invite.approximate_presence_count} online\t\t${STATUS_ICONS.offline}${invite.approximate_member_count} members`, + value: `<:online:1152111668856361010>${invite.approximate_presence_count} online\t\t<:offline:1152111682886316042>${invite.approximate_member_count} members`, inline: false, }, inviter, @@ -607,7 +600,7 @@ lookupinvite.callback = async function (msg, line) { name: "Features", value: features.length > 0 - ? features.slice(0, Math.floor(features.length / 2)).join("\n") + ? features.slice(0, Math.ceil(features.length / 2)).join("\n") : "None", inline: true, }, @@ -615,7 +608,7 @@ lookupinvite.callback = async function (msg, line) { ? { name: "\u200b", value: features - .slice(Math.floor(features.length / 2), features.length) + .slice(Math.ceil(features.length / 2), features.length) .join("\n"), inline: true, } @@ -690,7 +683,7 @@ lookupinvite.callback = async function (msg, line) { }, { name: "Member Count", - value: `${STATUS_ICONS.offline}${invite.approximate_member_count} members`, + value: `<:offline:1152111682886316042>${invite.approximate_member_count} members`, inline: true, }, expires,