mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-10 12:37:19 +00:00
more stuffers uwu
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
62ba356708
commit
ccb28ebc1b
1 changed files with 28 additions and 5 deletions
|
@ -159,7 +159,13 @@ export async function getServerInfoEmbed(
|
||||||
const categories = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildCategory);
|
const categories = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildCategory);
|
||||||
const textChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildText);
|
const textChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildText);
|
||||||
const voiceChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildVoice);
|
const voiceChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildVoice);
|
||||||
const threadChannels = thisServer.channels.cache.filter((channel) => channel.isThread());
|
const forumChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildForum);
|
||||||
|
const threadChannelsText = thisServer.channels.cache.filter(
|
||||||
|
(channel) => channel.isThread() && channel.parent?.type !== ChannelType.GuildForum,
|
||||||
|
);
|
||||||
|
const threadChannelsForums = thisServer.channels.cache.filter(
|
||||||
|
(channel) => channel.isThread() && channel.parent?.type === ChannelType.GuildForum,
|
||||||
|
);
|
||||||
const announcementChannels = thisServer.channels.cache.filter(
|
const announcementChannels = thisServer.channels.cache.filter(
|
||||||
(channel) => channel.type === ChannelType.GuildAnnouncement,
|
(channel) => channel.type === ChannelType.GuildAnnouncement,
|
||||||
);
|
);
|
||||||
|
@ -172,7 +178,8 @@ export async function getServerInfoEmbed(
|
||||||
value: trimLines(`
|
value: trimLines(`
|
||||||
Total: **${totalChannels}** / 500
|
Total: **${totalChannels}** / 500
|
||||||
Categories: **${categories.size}**
|
Categories: **${categories.size}**
|
||||||
Text: **${textChannels.size}** (**${threadChannels.size} threads**)
|
Text: **${textChannels.size}** (**${threadChannelsText.size} threads**)
|
||||||
|
Forums: **${forumChannels.size}** (**${threadChannelsForums.size} threads**)
|
||||||
Announcement: **${announcementChannels.size}**
|
Announcement: **${announcementChannels.size}**
|
||||||
Voice: **${voiceChannels.size}**
|
Voice: **${voiceChannels.size}**
|
||||||
Stage: **${stageChannels.size}**
|
Stage: **${stageChannels.size}**
|
||||||
|
@ -187,6 +194,12 @@ export async function getServerInfoEmbed(
|
||||||
otherStats.push(`Roles: **${thisServer.roles.cache.size}** / 250`);
|
otherStats.push(`Roles: **${thisServer.roles.cache.size}** / 250`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const roleLockedEmojis = (
|
||||||
|
restGuild
|
||||||
|
? restGuild?.emojis?.cache.filter((e) => e.roles.cache.size)
|
||||||
|
: guildPreview?.emojis.filter((e) => e.roles.length)
|
||||||
|
)!.size;
|
||||||
|
|
||||||
if (restGuild) {
|
if (restGuild) {
|
||||||
const maxEmojis =
|
const maxEmojis =
|
||||||
{
|
{
|
||||||
|
@ -203,15 +216,25 @@ export async function getServerInfoEmbed(
|
||||||
[GuildPremiumTier.Tier3]: 60,
|
[GuildPremiumTier.Tier3]: 60,
|
||||||
}[restGuild.premiumTier] ?? 0;
|
}[restGuild.premiumTier] ?? 0;
|
||||||
|
|
||||||
otherStats.push(`Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}`);
|
otherStats.push(
|
||||||
|
`Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}${
|
||||||
|
roleLockedEmojis ? ` (__${roleLockedEmojis} role-locked__)` : ""
|
||||||
|
}`,
|
||||||
|
);
|
||||||
otherStats.push(`Stickers: **${restGuild.stickers.cache.size}** / ${maxStickers}`);
|
otherStats.push(`Stickers: **${restGuild.stickers.cache.size}** / ${maxStickers}`);
|
||||||
} else {
|
} else {
|
||||||
otherStats.push(`Emojis: **${guildPreview!.emojis.size}**`);
|
otherStats.push(
|
||||||
|
`Emojis: **${guildPreview!.emojis.size}**${roleLockedEmojis ? ` (__${roleLockedEmojis} role-locked__)` : ""}`,
|
||||||
|
);
|
||||||
// otherStats.push(`Stickers: **${guildPreview!.stickers.size}**`); Wait on DJS
|
// otherStats.push(`Stickers: **${guildPreview!.stickers.size}**`); Wait on DJS
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thisServer) {
|
if (thisServer) {
|
||||||
otherStats.push(`Boosts: **${thisServer.premiumSubscriptionCount ?? 0}** (level ${thisServer.premiumTier})`);
|
otherStats.push(
|
||||||
|
`Boosts: **${thisServer.premiumSubscriptionCount ?? 0}**${
|
||||||
|
thisServer.premiumTier ? ` (level ${thisServer.premiumTier})` : ""
|
||||||
|
}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue