utility.linvite: sort features
This commit is contained in:
parent
fdd712a237
commit
5117f101e8
1 changed files with 5 additions and 12 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue