diff --git a/src/commands/server/about.ts b/src/commands/server/about.ts
index c0a2ede..0a1cc6f 100644
--- a/src/commands/server/about.ts
+++ b/src/commands/server/about.ts
@@ -3,48 +3,84 @@
 import { WrappedCheck } from "jshaiku";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../utils/getEmojiByName.js";
-import generateKeyValueList, { toCapitals } from "../../utils/generateKeyValueList.js";
+import generateKeyValueList, {
+    toCapitals
+} from "../../utils/generateKeyValueList.js";
 import client from "../../utils/client.js";
 
-const command = (builder: SlashCommandSubcommandBuilder) => builder
-    .setName("about")
-    .setDescription("Shows info about the server");
+const command = (builder: SlashCommandSubcommandBuilder) =>
+    builder.setName("about").setDescription("Shows info about the server");
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
-    const guild = interaction.guild as Guild;
+    const guild = interaction.guild!;
     const { renderUser, renderDelta } = client.logger;
-    interaction.reply({embeds: [new EmojiEmbed()
-        .setTitle("Server Info")
-        .setStatus("Success")
-        .setEmoji("GUILD.GREEN")
-        .setDescription(
-            generateKeyValueList({
-                "name": guild.name,
-                "id": `\`${guild.id}\``,
-                "owner": `${renderUser((await guild.fetchOwner()).user)}`,
-                "created": `${renderDelta(guild.createdTimestamp)}`,
-                "emojis": `${guild.emojis.cache.size}` + (guild.emojis.cache.size > 1 ? `\n> ${
-                    guild.emojis.cache.first(10).map((emoji) => `<${emoji.animated ? "a" : ""}:${emoji.name}:${emoji.id}>`).join(" ")
-                }` +
-                    (guild.emojis.cache.size > 10 ? ` and ${guild.emojis.cache.size - 10} more` : "") : ""),
-                "icon": `[Discord](${guild.iconURL()})`,
-                "2 factor authentication": `${guild.mfaLevel === "NONE" ? `${getEmojiByName("CONTROL.CROSS")} No` : `${getEmojiByName("CONTROL.TICK")} Yes`}`,
-                "verification level": `${toCapitals(guild.verificationLevel)}`,
-                "explicit content filter": `${toCapitals(guild.explicitContentFilter.toString().replace(/_/, " " ))}`,
-                "nitro boost level": `${guild.premiumTier !== "NONE" ? guild.premiumTier.toString()[-1] : "0"}`,
-                "channels": `${guild.channels.cache.size}`,
-                "roles": `${guild.roles.cache.size}`,
-                "members": `${guild.memberCount}`
-            })
-        )
-        .setThumbnail(guild.iconURL({dynamic: true}))
-    ], ephemeral: true});
+    interaction.reply({
+        embeds: [
+            new EmojiEmbed()
+                .setTitle("Server Info")
+                .setStatus("Success")
+                .setEmoji("GUILD.GREEN")
+                .setDescription(
+                    generateKeyValueList({
+                        name: guild.name,
+                        id: `\`${guild.id}\``,
+                        owner: `${renderUser((await guild.fetchOwner()).user)}`,
+                        created: `${renderDelta(guild.createdTimestamp)}`,
+                        emojis:
+                            `${guild.emojis.cache.size}` +
+                            (guild.emojis.cache.size > 1
+                                ? `\n> ${guild.emojis.cache
+                                      .first(10)
+                                      .map(
+                                          (emoji) =>
+                                              `<${emoji.animated ? "a" : ""}:${
+                                                  emoji.name
+                                              }:${emoji.id}>`
+                                      )
+                                      .join(" ")}` +
+                                  (guild.emojis.cache.size > 10
+                                      ? ` and ${
+                                            guild.emojis.cache.size - 10
+                                        } more`
+                                      : "")
+                                : ""),
+                        icon: `[Discord](${guild.iconURL()})`,
+                        "2 factor authentication": `${
+                            guild.mfaLevel === "NONE"
+                                ? `${getEmojiByName("CONTROL.CROSS")} No`
+                                : `${getEmojiByName("CONTROL.TICK")} Yes`
+                        }`,
+                        "verification level": `${toCapitals(
+                            guild.verificationLevel
+                        )}`,
+                        "explicit content filter": `${toCapitals(
+                            guild.explicitContentFilter
+                                .toString()
+                                .replace(/_/, " ")
+                        )}`,
+                        "nitro boost level": `${
+                            guild.premiumTier !== "NONE"
+                                ? guild.premiumTier.toString()[-1]
+                                : "0"
+                        }`,
+                        channels: `${guild.channels.cache.size}`,
+                        roles: `${guild.roles.cache.size}`,
+                        members: `${guild.memberCount}`
+                    })
+                )
+                .setThumbnail(guild.iconURL({ dynamic: true }))
+        ],
+        ephemeral: true
+    });
 };
 
-const check = (_interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (
+    _interaction: CommandInteraction,
+    _defaultCheck: WrappedCheck
+) => {
     return true;
 };
 
 export { command };
 export { callback };
-export { check };
\ No newline at end of file
+export { check };
