3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Utility: remove 'Large' from !server command, tweak the layout a bit

This commit is contained in:
Dragory 2019-02-18 02:07:54 +02:00
parent d6bbf7d46c
commit 015004df6a

View file

@ -527,29 +527,11 @@ export class UtilityPlugin extends ZeppelinPlugin {
trimLines(`
Created: **${serverAge} ago** (${createdAt.format("YYYY-MM-DD[T]HH:mm:ss")})
Owner: **${ownerName}** (${this.guild.ownerID})
Large: **${this.guild.large ? "yes" : "no"}**
Voice region: **${this.guild.region}**
${this.guild.features.length > 0 ? "Features: " + this.guild.features.join(", ") : ""}
`) + embedPadding,
});
const categories = this.guild.channels.filter(channel => channel instanceof CategoryChannel);
const textChannels = this.guild.channels.filter(channel => channel instanceof TextChannel);
const voiceChannels = this.guild.channels.filter(channel => channel instanceof VoiceChannel);
embed.fields.push({
name: "Counts",
inline: true,
value:
trimLines(`
Roles: **${this.guild.roles.size}**
Categories: **${categories.length}**
Text channels: **${textChannels.length}**
Voice channels: **${voiceChannels.length}**
Emojis: **${this.guild.emojis.length}**
`) + embedPadding,
});
const onlineMembers = this.guild.members.filter(m => m.status === "online");
const dndMembers = this.guild.members.filter(m => m.status === "dnd");
const idleMembers = this.guild.members.filter(m => m.status === "idle");
@ -569,6 +551,23 @@ export class UtilityPlugin extends ZeppelinPlugin {
`),
});
const categories = this.guild.channels.filter(channel => channel instanceof CategoryChannel);
const textChannels = this.guild.channels.filter(channel => channel instanceof TextChannel);
const voiceChannels = this.guild.channels.filter(channel => channel instanceof VoiceChannel);
embed.fields.push({
name: "Other stats",
inline: true,
value:
trimLines(`
Roles: **${this.guild.roles.size}**
Categories: **${categories.length}**
Text channels: **${textChannels.length}**
Voice channels: **${voiceChannels.length}**
Emojis: **${this.guild.emojis.length}**
`) + embedPadding,
});
msg.channel.createMessage({ embed });
}