diff --git a/src/reflex/guide.ts b/src/reflex/guide.ts
index a3027e4..1901d34 100644
--- a/src/reflex/guide.ts
+++ b/src/reflex/guide.ts
@@ -1,4 +1,4 @@
-import { getCommandMentionByName } from './../utils/getCommandDataByName.js';
+import { getCommandMentionByName } from "./../utils/getCommandDataByName.js";
 import { LoadingEmbed } from "../utils/defaults.js";
 import Discord, {
     ActionRowBuilder,
@@ -19,19 +19,19 @@
 export default async (guild: Guild, interaction?: CommandInteraction) => {
     let c: GuildTextBasedChannel | null = guild.publicUpdatesChannel ? guild.publicUpdatesChannel : guild.systemChannel;
     c = c
-    ? c
-    : (guild.channels.cache.find(
-        (ch) =>
-        [
-            ChannelType.GuildText,
-            ChannelType.GuildAnnouncement,
-            ChannelType.PublicThread,
-            ChannelType.PrivateThread,
-            ChannelType.AnnouncementThread
-        ].includes(ch.type) &&
-        ch.permissionsFor(guild.roles.everyone).has("SendMessages") &&
-        ch.permissionsFor(guild.members.me!).has("EmbedLinks")
-        ) as GuildTextBasedChannel | undefined) ?? null;
+        ? c
+        : (guild.channels.cache.find(
+              (ch) =>
+                  [
+                      ChannelType.GuildText,
+                      ChannelType.GuildAnnouncement,
+                      ChannelType.PublicThread,
+                      ChannelType.PrivateThread,
+                      ChannelType.AnnouncementThread
+                  ].includes(ch.type) &&
+                  ch.permissionsFor(guild.roles.everyone).has("SendMessages") &&
+                  ch.permissionsFor(guild.members.me!).has("EmbedLinks")
+          ) as GuildTextBasedChannel | undefined) ?? null;
     if (interaction) c = interaction.channel as GuildTextBasedChannel;
     if (!c) {
         return;
@@ -71,12 +71,22 @@
                         "Nucleus can log server events and keep you informed with what content is being posted to your server.\n" +
                             "We have 2 different types of logs, which each can be configured to send to a channel of your choice:\n" +
                             "**General:** These are events like kicks and channel changes etc.\n" +
-                            `> These are standard logs and can be set with ${getCommandMentionByName("settings/logs/general")}\n` +
+                            `> These are standard logs and can be set with ${getCommandMentionByName(
+                                "settings/logs/general"
+                            )}\n` +
                             "**Warnings:** Warnings like NSFW avatars and spam etc. that may require action by a server staff member.\n" +
-                            `> These may require special action by a moderator. You can set the channel with ${getCommandMentionByName("settings/logs/warnings")}\n` +
+                            `> These may require special action by a moderator. You can set the channel with ${getCommandMentionByName(
+                                "settings/logs/warnings"
+                            )}\n` +
                             "**Attachments:** All images sent in the server - Used to keep a record of deleted images\n" +
-                            `> Sent to a separate log channel to avoid spam. This can be set with ${getCommandMentionByName("settings/logs/attachments")}\n` +
-                            `> ${getEmojiByName("NUCLEUS.PREMIUM")} Please note this feature is only available with ${getCommandMentionByName("nucleus/premium")}`
+                            `> Sent to a separate log channel to avoid spam. This can be set with ${getCommandMentionByName(
+                                "settings/logs/attachments"
+                            )}\n` +
+                            `> ${getEmojiByName(
+                                "NUCLEUS.PREMIUM"
+                            )} Please note this feature is only available with ${getCommandMentionByName(
+                                "nucleus/premium"
+                            )}`
                     )
                     .setEmoji("ICONS.LOGGING")
                     .setStatus("Danger")
@@ -90,15 +100,33 @@
                     .setTitle("Moderation")
                     .setDescription(
                         "Nucleus has a number of commands that can be used to moderate your server.\n" +
-                            `These commands are all found under ${getCommandMentionByName(("mod"))}, and they include:\n` +
-                            `${getEmojiByName("PUNISH.WARN.YELLOW")} ${getCommandMentionByName("mod/warn")}: The user is warned (via DM) that they violated server rules. More options given if DMs are disabled.\n` +
-                            `${getEmojiByName("PUNISH.CLEARHISTORY")} ${getCommandMentionByName("mod/purge")}: Deletes messages in a channel, giving options to only delete messages by a certain user.\n` +
-                            `${getEmojiByName("PUNISH.MUTE.YELLOW")} ${getCommandMentionByName("mod/mute")}: Stops users sending messages or joining voice chats.\n` +
-                            `${getEmojiByName("PUNISH.MUTE.GREEN")} ${getCommandMentionByName("mod/unmute")}: Allows user to send messages and join voice chats.\n` +
-                            `${getEmojiByName("PUNISH.KICK.RED")} ${getCommandMentionByName("mod/kick")}: Removes a member from the server. They will be able to rejoin.\n` +
-                            `${getEmojiByName("PUNISH.SOFTBAN")} ${getCommandMentionByName("mod/softban")}: Kicks the user, deleting their messages from every channel in a given time frame.\n` +
-                            `${getEmojiByName("PUNISH.BAN.RED")} ${getCommandMentionByName("mod/ban")}: Removes the user from the server, deleting messages from every channel and stops them from rejoining.\n` +
-                            `${getEmojiByName("PUNISH.BAN.GREEN")} ${getCommandMentionByName("mod/unban")}: Allows a member to rejoin the server after being banned.`
+                            `These commands are all found under ${getCommandMentionByName(
+                                "mod"
+                            )}, and they include:\n` +
+                            `${getEmojiByName("PUNISH.WARN.YELLOW")} ${getCommandMentionByName(
+                                "mod/warn"
+                            )}: The user is warned (via DM) that they violated server rules. More options given if DMs are disabled.\n` +
+                            `${getEmojiByName("PUNISH.CLEARHISTORY")} ${getCommandMentionByName(
+                                "mod/purge"
+                            )}: Deletes messages in a channel, giving options to only delete messages by a certain user.\n` +
+                            `${getEmojiByName("PUNISH.MUTE.YELLOW")} ${getCommandMentionByName(
+                                "mod/mute"
+                            )}: Stops users sending messages or joining voice chats.\n` +
+                            `${getEmojiByName("PUNISH.MUTE.GREEN")} ${getCommandMentionByName(
+                                "mod/unmute"
+                            )}: Allows user to send messages and join voice chats.\n` +
+                            `${getEmojiByName("PUNISH.KICK.RED")} ${getCommandMentionByName(
+                                "mod/kick"
+                            )}: Removes a member from the server. They will be able to rejoin.\n` +
+                            `${getEmojiByName("PUNISH.SOFTBAN")} ${getCommandMentionByName(
+                                "mod/softban"
+                            )}: Kicks the user, deleting their messages from every channel in a given time frame.\n` +
+                            `${getEmojiByName("PUNISH.BAN.RED")} ${getCommandMentionByName(
+                                "mod/ban"
+                            )}: Removes the user from the server, deleting messages from every channel and stops them from rejoining.\n` +
+                            `${getEmojiByName("PUNISH.BAN.GREEN")} ${getCommandMentionByName(
+                                "mod/unban"
+                            )}: Allows a member to rejoin the server after being banned.`
                     )
                     .setEmoji("PUNISH.BAN.RED")
                     .setStatus("Danger")
@@ -112,7 +140,9 @@
                     .setTitle("Verify")
                     .setDescription(
                         "Nucleus has a verification system that allows users to prove they aren't bots.\n" +
-                            `This is done by running ${getCommandMentionByName("verify")} which sends a message only the user can see, giving them a link to a website to verify.\n` +
+                            `This is done by running ${getCommandMentionByName(
+                                "verify"
+                            )} which sends a message only the user can see, giving them a link to a website to verify.\n` +
                             "After the user complete's the check, they are given a role, which can be set to unlock specific channels.\n" +
                             `You can set the role given with ${getCommandMentionByName("settings/verify")}`
                     )
@@ -129,7 +159,9 @@
                     .setDescription(
                         "Nucleus has a content scanning system that automatically scans links and images sent by users.\n" +
                             "The staff team can be notified when an NSFW image is detected, or malicious links are sent.\n" +
-                            `You can check and manage what to moderate in ${getCommandMentionByName("settings/automod")}`
+                            `You can check and manage what to moderate in ${getCommandMentionByName(
+                                "settings/automod"
+                            )}`
                     )
                     .setEmoji("MOD.IMAGES.TOOSMALL")
                     .setStatus("Danger")
@@ -143,10 +175,16 @@
                     .setTitle("Tickets")
                     .setDescription(
                         "Nucleus has a ticket system which allows users to create tickets and talk to the server staff or support team.\n" +
-                            `Tickets can be created by users with ${getCommandMentionByName("ticket/create")}, or by clicking a button created by moderators.\n` +
+                            `Tickets can be created by users with ${getCommandMentionByName(
+                                "ticket/create"
+                            )}, or by clicking a button created by moderators.\n` +
                             `After being created, a new channel or thread is created, and the user and support team are pinged. \n` +
-                            `The category or channel to create threads in can be set with ${getCommandMentionByName("settings/tickets")}\n` +
-                            `When the ticket is resolved, anyone can run ${getCommandMentionByName("ticket/close")} (or click the button) to close it.\n` +
+                            `The category or channel to create threads in can be set with ${getCommandMentionByName(
+                                "settings/tickets"
+                            )}\n` +
+                            `When the ticket is resolved, anyone can run ${getCommandMentionByName(
+                                "ticket/close"
+                            )} (or click the button) to close it.\n` +
                             `Running ${getCommandMentionByName("ticket/close")} again will delete the ticket.`
                     )
                     .setEmoji("GUILD.TICKET.CLOSE")
@@ -161,8 +199,12 @@
                     .setTitle("Tags")
                     .setDescription(
                         "Nucleus allows you to create tags, which allow a message to be sent when a specific tag is typed.\n" +
-                            `Tags can be created with ${getCommandMentionByName("tags/create")}, and can be edited with ${getCommandMentionByName("tags/edit")}\n` +
-                            `Tags can be deleted with ${getCommandMentionByName("tags/delete")}, and can be listed with ${getCommandMentionByName("tags/list")}\n` +
+                            `Tags can be created with ${getCommandMentionByName(
+                                "tags/create"
+                            )}, and can be edited with ${getCommandMentionByName("tags/edit")}\n` +
+                            `Tags can be deleted with ${getCommandMentionByName(
+                                "tags/delete"
+                            )}, and can be listed with ${getCommandMentionByName("tags/list")}\n` +
                             `To use a tag, you can type ${getCommandMentionByName("tag")}, followed by the tag to send`
                     )
                     .setEmoji("PUNISH.NICKNAME.RED")
@@ -177,9 +219,9 @@
                     .setTitle("Premium")
                     .setDescription(
                         "Nucleus Premium allows you to use extra features in your server, which are useful but not essential.\n" +
-                        "**No currently free commands will become premium features.**\n" +
-                        "Premium features include creating ticket transcripts and attachment logs.\n\n" +
-                        "Premium can be purchased in [our server](https://discord.gg/bPaNnxe) in the subscriptions page" // TODO: add a table graphic
+                            "**No currently free commands will become premium features.**\n" +
+                            "Premium features include creating ticket transcripts and attachment logs.\n\n" +
+                            "Premium can be purchased in [our server](https://discord.gg/bPaNnxe) in the subscriptions page" // TODO: add a table graphic
                     )
                     .setEmoji("NUCLEUS.PREMIUM")
                     .setStatus("Danger")
@@ -203,10 +245,11 @@
         if (selectPaneOpen) {
             const options: Discord.StringSelectMenuOptionBuilder[] = [];
             pages.forEach((embed) => {
-                options.push(new Discord.StringSelectMenuOptionBuilder()
-                    .setLabel(embed.title)
-                    .setValue(embed.pageId.toString())
-                    .setDescription(embed.description || "")
+                options.push(
+                    new Discord.StringSelectMenuOptionBuilder()
+                        .setLabel(embed.title)
+                        .setValue(embed.pageId.toString())
+                        .setDescription(embed.description || "")
                 );
             });
             selectPane = [
@@ -257,7 +300,9 @@
         try {
             i = await m.awaitMessageComponent({
                 filter: interaction
-                    ? (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id }
+                    ? (i) => {
+                          return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id;
+                      }
                     : publicFilter,
                 time: 300000
             });
