mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Update to eris#dev
This commit is contained in:
parent
ab51231fef
commit
53b64682ee
5 changed files with 33 additions and 22 deletions
|
@ -9,6 +9,7 @@ import {
|
|||
EmbedWith,
|
||||
emptyEmbedValue,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
preEmbedPadding,
|
||||
|
@ -50,13 +51,17 @@ export async function getInviteInfoEmbed(
|
|||
round: true,
|
||||
});
|
||||
|
||||
const memberCount = inviteHasCounts(invite) ? invite.memberCount : 0;
|
||||
|
||||
const presenceCount = inviteHasCounts(invite) ? invite.presenceCount : 0;
|
||||
|
||||
embed.fields.push({
|
||||
name: preEmbedPadding + "Server information",
|
||||
value: trimLines(`
|
||||
Name: **${invite.guild.name}**
|
||||
ID: \`${invite.guild.id}\`
|
||||
Created: **${serverAge} ago**
|
||||
Members: **${formatNumber(invite.memberCount)}** (${formatNumber(invite.presenceCount)} online)
|
||||
Members: **${formatNumber(memberCount)}** (${formatNumber(presenceCount)} online)
|
||||
`),
|
||||
inline: true,
|
||||
});
|
||||
|
|
|
@ -4,6 +4,7 @@ import {
|
|||
embedPadding,
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
|
@ -120,7 +121,7 @@ export async function getServerInfoEmbed(
|
|||
if (onlineMemberCount == null && restGuild?.vanityURL) {
|
||||
// For servers with a vanity URL, we can also use the numbers from the invite for online count
|
||||
const invite = await resolveInvite(pluginData.client, restGuild.vanityURL!, true);
|
||||
if (invite) {
|
||||
if (invite && inviteHasCounts(invite)) {
|
||||
onlineMemberCount = invite.presenceCount;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue