From 015004df6ae508a6347041efe6b7fcb8fdc8d36b Mon Sep 17 00:00:00 2001 From: Dragory Date: Mon, 18 Feb 2019 02:07:54 +0200 Subject: [PATCH] Utility: remove 'Large' from !server command, tweak the layout a bit --- src/plugins/Utility.ts | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/plugins/Utility.ts b/src/plugins/Utility.ts index 1fa297b9..057bc975 100644 --- a/src/plugins/Utility.ts +++ b/src/plugins/Utility.ts @@ -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 }); }