diff --git a/src/automations/guide.ts b/src/automations/guide.ts
index d443a42..2a686b9 100644
--- a/src/automations/guide.ts
+++ b/src/automations/guide.ts
@@ -181,7 +181,7 @@
         }
         let i
         try {
-            i = await m.awaitMessageComponent({filter: interaction ? () => { return true } : f, time: 600000});
+            i = await m.awaitMessageComponent({filter: interaction ? () => { return true } : f, time: 300000});
         } catch(e) { break }
         i.deferUpdate()
         if (i.component.customId == "left") {
diff --git a/src/automations/roleMenu.ts b/src/automations/roleMenu.ts
index cac15a5..1b5f3eb 100644
--- a/src/automations/roleMenu.ts
+++ b/src/automations/roleMenu.ts
@@ -67,7 +67,7 @@
         })
     }
     let component;
-    try { component = await (m as Message).awaitMessageComponent({time: 2.5 * 60 * 1000});
+    try { component = await (m as Message).awaitMessageComponent({time: 300000});
     } catch (e) { return }
     component.deferUpdate()
     let rolesToAdd = []
@@ -107,7 +107,7 @@
         });
         let component;
         try {
-            component = await (m as Message).awaitMessageComponent({time: 2.5 * 60 * 1000});
+            component = await (m as Message).awaitMessageComponent({time: 300000});
         } catch (e) {
             return
         }
diff --git a/src/automations/tickets/create.ts b/src/automations/tickets/create.ts
index 9642089..af5ac0d 100644
--- a/src/automations/tickets/create.ts
+++ b/src/automations/tickets/create.ts
@@ -74,7 +74,7 @@
         ], ephemeral: true, fetchReply: true, components: splitFormattedTicketTypes});
         let component;
         try {
-            component = await (m as Discord.Message).awaitMessageComponent({time: 2.5 * 60 * 1000});
+            component = await (m as Discord.Message).awaitMessageComponent({time: 300000});
         } catch (e) {
             return;
         }
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index 854f38f..ef0a7db 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -91,7 +91,7 @@
         ], ephemeral: true, fetchReply: true})
         let component;
         try {
-            component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 2.5 * 60 * 1000});
+            component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 300000});
         } catch { return }
         component.deferUpdate();
         if (component.customId == "cancel") return interaction.editReply({embeds: [new generateEmojiEmbed()
diff --git a/src/commands/mod/purge.ts b/src/commands/mod/purge.ts
index 8e6762e..c6a44b3 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -99,7 +99,7 @@
             })
             let component;
             try {
-                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 2.5 * 60 * 1000});
+                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 300000});
             } catch (e) { break; }
             component.deferUpdate();
             if (component.customId === "done") break;
@@ -177,7 +177,7 @@
         ])]})
         let component;
         try {
-            component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 2.5 * 60 * 1000});
+            component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 300000});
         } catch {}
         if (component && component.customId === "download") {
             interaction.editReply({embeds: [new generateEmojiEmbed()
@@ -276,7 +276,7 @@
             ])]})
             let component;
             try {
-                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 2.5 * 60 * 1000});
+                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 300000});
             } catch {}
             if (component && component.customId === "download") {
                 interaction.editReply({embeds: [new generateEmojiEmbed()
diff --git a/src/commands/mod/unban.ts b/src/commands/mod/unban.ts
index f201142..f7bf74f 100644
--- a/src/commands/mod/unban.ts
+++ b/src/commands/mod/unban.ts
@@ -11,7 +11,7 @@
     .setDescription("Unbans a user")
     .addStringOption(option => option.setName("user").setDescription("The user to unban (Username or ID)").setRequired(true))
 
-const callback = async (interaction: CommandInteraction) => { // TODO: User search UI
+const callback = async (interaction: CommandInteraction) => {
     let bans = await interaction.guild.bans.fetch()
     let user = interaction.options.getString("user")
     let resolved = bans.find(ban => ban.user.id == user)
diff --git a/src/commands/mod/viewas.ts b/src/commands/mod/viewas.ts
index 5f7c7de..705c04a 100644
--- a/src/commands/mod/viewas.ts
+++ b/src/commands/mod/viewas.ts
@@ -1,6 +1,8 @@
-import { CategoryChannel, CommandInteraction } from "discord.js";
+import Discord, { CategoryChannel, CommandInteraction } from "discord.js";
 import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
+import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import { WrappedCheck } from "jshaiku";
+import getEmojiByName from "../../utils/getEmojiByName.js";
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -8,11 +10,47 @@
     .setDescription("View the server as a specific member")
     .addUserOption(option => option.setName("member").setDescription("The member to view as").setRequired(true))
 
-const callback = (interaction: CommandInteraction) => {
-    let channels = interaction.guild.channels.cache
+const callback = async (interaction: CommandInteraction) => {
+    let channels = []
+    interaction.guild.channels.cache.forEach(channel => {
+        if (!channel.parent && channel.type !== "GUILD_CATEGORY") channels.push(channel)
+    })
+    channels = [channels]
+    channels = channels.concat(interaction.guild.channels.cache
         .filter(c => c.type === "GUILD_CATEGORY")
         .map(c => (c as CategoryChannel).children.map(c => c))
-    console.log(channels)
+    )
+    let autoSortBelow = ["GUILD_VOICE", "GUILD_STAGE_VOICE"]
+    channels = channels.map(c => c.sort((a, b) => {
+        if (autoSortBelow.includes(a.type) && autoSortBelow.includes(b.type)) return a.name.localeCompare(b.name)
+        if (autoSortBelow.includes(a.type)) return -1
+        if (autoSortBelow.includes(b.type)) return 1
+        return a.position - b.position
+    }))
+    let member = interaction.options.getMember("member") as Discord.GuildMember
+    await interaction.reply({embeds: [new generateEmojiEmbed()
+        .setEmoji("MEMBER.JOIN")
+        .setTitle("Viewing as " + member.displayName)
+        .setStatus("Success")
+    ], ephemeral: true})
+    let page = 0;
+    while (true) {
+        await interaction.editReply({embeds: [new generateEmojiEmbed()
+            .setEmoji("MEMBER.JOIN")
+            .setTitle("Viewing as " + member.displayName)
+            .setStatus("Success")
+            .setDescription(
+                `${channels[page][0].parent ? channels[page][0].parent.name  : "Uncategorised"}` +
+                "Visible:\n" +
+                channels[page].map(c => {
+                    console.log(c)
+                    return (channels[page] as Discord.GuildChannel).permissionsFor(member).has("VIEW_CHANNEL") ?
+                        `${getEmojiByName("ICONS.CHANNEL." + c.type)} ${c.name}\n` : ""
+                }).join("")
+            )
+        ]})
+        break
+    }
 }
 
 const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index 46e2871..bd4bcff 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -109,7 +109,7 @@
             })
             let component;
             try {
-                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 2.5 * 60 * 1000});
+                component = await (m as Discord.Message).awaitMessageComponent({filter: (m) => m.user.id === interaction.user.id, time: 300000});
             } catch (e) {
                 return await interaction.editReply({embeds: [new generateEmojiEmbed()
                     .setEmoji(`PUNISH.WARN.GREEN`)
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 18ed8d9..448f26a 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -89,7 +89,7 @@
         ])]});
         let i;
         try {
-            i = await m.awaitMessageComponent({time: 600000});
+            i = await m.awaitMessageComponent({time: 300000});
         } catch(e) { break }
         i.deferUpdate()
         if (i.component.customId == "clear") {
diff --git a/src/commands/settings/staff/channel.ts b/src/commands/settings/staff/channel.ts
index 69ace92..354d7f1 100644
--- a/src/commands/settings/staff/channel.ts
+++ b/src/commands/settings/staff/channel.ts
@@ -91,7 +91,7 @@
         ])]});
         let i;
         try {
-            i = await m.awaitMessageComponent({time: 600000});
+            i = await m.awaitMessageComponent({time: 300000});
         } catch(e) { break }
         i.deferUpdate()
         if (i.component.customId == "clear") {
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index aac271e..895d7d7 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -200,7 +200,7 @@
         });
         let i;
         try {
-            i = await m.awaitMessageComponent({ time: 600000 });
+            i = await m.awaitMessageComponent({ time: 300000 });
         } catch (e) { break }
         i.deferUpdate()
         if (i.component.customId == "clearCategory") {
@@ -237,7 +237,7 @@
     while (true) {
         if (data.useCustom) {
             let customTypes = data.customTypes;
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [new generateEmojiEmbed()
                     .setTitle("Tickets > Types")
                     .setDescription(
@@ -298,7 +298,7 @@
                     .setMinValues(1)
                     .setPlaceholder("Select types to use")
             ])
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [new generateEmojiEmbed()
                     .setTitle("Tickets > Types")
                     .setDescription(
@@ -326,7 +326,7 @@
         }
         let i;
         try {
-            i = await m.awaitMessageComponent({ time: 600000 });
+            i = await m.awaitMessageComponent({ time: 300000 });
         } catch (e) { break }
         if (i.component.customId == "types") {
             i.deferUpdate()
diff --git a/src/commands/settings/verify/role.ts b/src/commands/settings/verify/role.ts
index dc1d4d9..68b4bf9 100644
--- a/src/commands/settings/verify/role.ts
+++ b/src/commands/settings/verify/role.ts
@@ -86,7 +86,7 @@
         ])]});
         let i;
         try {
-            i = await m.awaitMessageComponent({time: 600000});
+            i = await m.awaitMessageComponent({time: 300000});
         } catch(e) { break }
         i.deferUpdate()
         if (i.component.customId == "clear") {
diff --git a/src/commands/tag.ts b/src/commands/tag.ts
index 8d6d8c9..c9739c2 100644
--- a/src/commands/tag.ts
+++ b/src/commands/tag.ts
@@ -8,7 +8,7 @@
     .setDescription("Get and manage the servers tags")
 
 const callback = (interaction: CommandInteraction) => {
-    try { statsChannelAdd(interaction.client, interaction.member); } catch {} // TODO: REMOVE THIS FOR PRODUCTION
+    // try { statsChannelAdd(interaction.client, interaction.member); } catch {} // TODO: REMOVE THIS FOR PRODUCTION
     interaction.reply("This command is not yet finished [tag]");
 }
 
@@ -18,4 +18,4 @@
 
 export { command };
 export { callback };
-export { check };
\ No newline at end of file
+export { check };
diff --git a/src/commands/tags/list.ts b/src/commands/tags/list.ts
index bf234d5..5052a6b 100644
--- a/src/commands/tags/list.ts
+++ b/src/commands/tags/list.ts
@@ -100,7 +100,7 @@
         });
         let i
         try {
-            i = await m.awaitMessageComponent({time: 600000 });
+            i = await m.awaitMessageComponent({time: 300000 });
         } catch (e) { break }
         i.deferUpdate()
         if (i.component.customId == "left") {
diff --git a/src/commands/user/about.ts b/src/commands/user/about.ts
index bdd73c4..b497359 100644
--- a/src/commands/user/about.ts
+++ b/src/commands/user/about.ts
@@ -209,7 +209,7 @@
         })
         let i
         try {
-            i = await m.awaitMessageComponent({time: 600000});
+            i = await m.awaitMessageComponent({time: 300000});
         } catch { breakReason = "Message timed out"; break }
         i.deferUpdate()
         if (i.component.customId == "left") {
diff --git a/src/commands/user/track.ts b/src/commands/user/track.ts
index f96f718..eea0b7b 100644
--- a/src/commands/user/track.ts
+++ b/src/commands/user/track.ts
@@ -125,7 +125,7 @@
         ])})
         let component;
         try {
-            component = await (m as Message).awaitMessageComponent({time: 2.5 * 60 * 1000});
+            component = await (m as Message).awaitMessageComponent({time: 300000});
         } catch (e) {
             return
         }
@@ -177,4 +177,5 @@
 
 export { command };
 export { callback };
-export { check };
\ No newline at end of file
+export { check };
+
diff --git a/src/config/emojis.json b/src/config/emojis.json
index 8264198..7fba0e5 100644
--- a/src/config/emojis.json
+++ b/src/config/emojis.json
@@ -22,11 +22,11 @@
             "REMOVE": "837355918420869162"
         },
         "CHANNEL": {
-            "TEXT": "752971441351426089",
-            "VOICE": "752971441586307091",
-            "STORE": "853668786925469706",
-            "ANNOUNCEMENT": "853668786493063169",
-            "STAGE": "853668786842763294"
+            "GUILD_TEXT": "752971441351426089",
+            "GUILD_VOICE": "752971441586307091",
+            "GUILD_STORE": "853668786925469706",
+            "GUILD_NEWS": "853668786493063169",
+            "GUILD_STAGE": "853668786842763294"
         }
     },
     "CONTROL": {
diff --git a/src/utils/calculate.ts b/src/utils/calculate.ts
index 8a297b9..a991918 100644
--- a/src/utils/calculate.ts
+++ b/src/utils/calculate.ts
@@ -6,8 +6,6 @@
     "guildUpdate",
     "guildMemberUpdate",
     "guildMemberPunish",
-    "guildEventUpdate", // TODO
-    "guildEventMemberUpdate", // TODO
     "guildRoleUpdate",
     "guildInviteUpdate",
     "messageUpdate",
@@ -17,10 +15,12 @@
     "messagePing",
     "messageMassPing",
     "messageAnnounce", // TODO
-    "stageUpdate",
     "threadUpdate",
-    "voiceStateUpdate", // TODO
-    "webhookUpdate" // TODO
+    "webhookUpdate", // TODO
+    "guildMemberVerify", // TODO
+    "autoModeratorDeleted", // TODO
+    "nucleusSettingsUpdated", // TODO
+    ""
 ]
 
 const tickets = [
diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 7a06d83..dbcd52f 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -99,7 +99,7 @@
             }
             let component;
             try {
-                component = await (m as Message).awaitMessageComponent({filter: (m) => m.user.id === this.interaction.user.id, time: 2.5 * 60 * 1000});
+                component = await (m as Message).awaitMessageComponent({filter: (m) => m.user.id === this.interaction.user.id, time: 300000});
             } catch (e) {
                 return {
                     success: false,
diff --git a/src/utils/convertCurlyBracketString.ts b/src/utils/convertCurlyBracketString.ts
index 093e522..0277751 100644
--- a/src/utils/convertCurlyBracketString.ts
+++ b/src/utils/convertCurlyBracketString.ts
@@ -12,4 +12,4 @@
     return str
 }
 
-export default convertCurlyBracketString;
\ No newline at end of file
+export default convertCurlyBracketString;
diff --git a/src/utils/dualCollector.ts b/src/utils/dualCollector.ts
index ae63757..902822a 100644
--- a/src/utils/dualCollector.ts
+++ b/src/utils/dualCollector.ts
@@ -7,9 +7,9 @@
     try {
         out = await new Promise((resolve, reject) => {
             let mes, int;
-            mes = m.createMessageComponentCollector({filter: (m) => interactionFilter(m), time: 600000})
+            mes = m.createMessageComponentCollector({filter: (m) => interactionFilter(m), time: 300000})
                 .on("collect", (m) => { resolve(m); })
-            int = m.channel.createMessageCollector({filter: (m) => messageFilter(m), time: 600000})
+            int = m.channel.createMessageCollector({filter: (m) => messageFilter(m), time: 300000})
                 .then("collect", (m) => { try {m.delete();} catch {}; resolve(m); })
             mes.on("end", () => { int.stop(); })
             int.on("end", () => { mes.stop(); })
@@ -27,12 +27,12 @@
     try {
         out = await new Promise((resolve, reject) => {
             let mod, int;
-            int = m.createMessageComponentCollector({filter: (m) => interactionFilter(m), time: 600000})
+            int = m.createMessageComponentCollector({filter: (m) => interactionFilter(m), time: 300000})
                 .on("collect", (m) => { resolve(m); })
             mod = new Discord.InteractionCollector(
                 client, {
                     filter: (m) => modalFilter(m),
-                    time: 600000
+                    time: 300000
                 })
                 .on("collect", async (m) => {
                     int.stop();
