Display available emojis separately from total on server info (#433)
* respect .available (almeida-approved code!!) Signed-off-by: GitHub <noreply@github.com> * Update backend/src/plugins/Utility/functions/getServerInfoEmbed.ts Co-authored-by: Almeida <almeidx@pm.me> --------- Signed-off-by: GitHub <noreply@github.com> Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
parent
fdefca17ae
commit
94a712832a
1 changed files with 6 additions and 1 deletions
|
@ -205,9 +205,14 @@ export async function getServerInfoEmbed(
|
|||
[GuildPremiumTier.Tier3]: 60,
|
||||
}[restGuild.premiumTier] ?? 0;
|
||||
|
||||
const availableEmojis = restGuild.emojis.cache.filter((e) => e.available);
|
||||
otherStats.push(
|
||||
`Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}${
|
||||
`Emojis: **${availableEmojis.size}** / ${maxEmojis * 2}${
|
||||
roleLockedEmojis ? ` (__${roleLockedEmojis} role-locked__)` : ""
|
||||
}${
|
||||
availableEmojis.size < restGuild.emojis.cache.size
|
||||
? ` (__+${restGuild.emojis.cache.size - availableEmojis.size} unavailable__)`
|
||||
: ""
|
||||
}`,
|
||||
);
|
||||
otherStats.push(`Stickers: **${restGuild.stickers.cache.size}** / ${maxStickers}`);
|
||||
|
|
Loading…
Add table
Reference in a new issue