diff --git a/src/actions/createModActionTicket.ts b/src/actions/createModActionTicket.ts
index 41f949c..0eca621 100644
--- a/src/actions/createModActionTicket.ts
+++ b/src/actions/createModActionTicket.ts
@@ -11,24 +11,11 @@
     customReason?: string
 ) {
     const config = await client.database.guilds.read(guild.id);
-    const {
-        log,
-        NucleusColors,
-        entry,
-        renderUser,
-        renderChannel,
-        renderDelta
-    } = client.logger;
+    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;
     const overwrites = [
         {
             id: member,
-            allow: [
-                "VIEW_CHANNEL",
-                "SEND_MESSAGES",
-                "ATTACH_FILES",
-                "ADD_REACTIONS",
-                "READ_MESSAGE_HISTORY"
-            ],
+            allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
             type: "member"
         }
     ] as Discord.OverwriteResolvable[];
@@ -40,13 +27,7 @@
     if (config.tickets.supportRole !== null) {
         overwrites.push({
             id: guild.roles.cache.get(config.tickets.supportRole),
-            allow: [
-                "VIEW_CHANNEL",
-                "SEND_MESSAGES",
-                "ATTACH_FILES",
-                "ADD_REACTIONS",
-                "READ_MESSAGE_HISTORY"
-            ],
+            allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
             type: "role"
         });
     }
@@ -67,16 +48,10 @@
     try {
         await c.send({
             content:
-                `<@${member.id}>` +
-                (config.tickets.supportRole !== null
-                    ? ` • <@&${config.tickets.supportRole}>`
-                    : ""),
+                `<@${member.id}>` + (config.tickets.supportRole !== null ? ` • <@&${config.tickets.supportRole}>` : ""),
             allowedMentions: {
                 users: [member.id],
-                roles:
-                    config.tickets.supportRole !== null
-                        ? [config.tickets.supportRole]
-                        : []
+                roles: config.tickets.supportRole !== null ? [config.tickets.supportRole] : []
             }
         });
         await c.send({
@@ -85,14 +60,8 @@
                     .setTitle("New Ticket")
                     .setDescription(
                         "Ticket created by a Moderator\n" +
-                            `**Support type:** ${
-                                customReason
-                                    ? customReason
-                                    : "Appeal submission"
-                            }\n` +
-                            (reason !== null
-                                ? `**Reason:**\n> ${reason}\n`
-                                : "") +
+                            `**Support type:** ${customReason ? customReason : "Appeal submission"}\n` +
+                            (reason !== null ? `**Reason:**\n> ${reason}\n` : "") +
                             `**Ticket ID:** \`${c.id}\`\n` +
                             "Type `/ticket close` to close this ticket."
                     )
@@ -121,10 +90,7 @@
             list: {
                 ticketFor: entry(member.id, renderUser(member)),
                 createdBy: entry(createdBy.id, renderUser(createdBy)),
-                created: entry(
-                    new Date().getTime(),
-                    renderDelta(new Date().getTime())
-                ),
+                created: entry(new Date().getTime(), renderDelta(new Date().getTime())),
                 ticketChannel: entry(c.id, renderChannel(c))
             },
             hidden: {
diff --git a/src/actions/roleMenu.ts b/src/actions/roleMenu.ts
index dc224e8..e7f1874 100644
--- a/src/actions/roleMenu.ts
+++ b/src/actions/roleMenu.ts
@@ -1,11 +1,22 @@
-import { MessageButton } from "discord.js";
+import { Interaction, MessageButton } from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import { MessageActionRow, MessageSelectMenu } from "discord.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
 import client from "../utils/client.js";
 import { LoadingEmbed } from "../utils/defaultEmbeds.js";
+import type { GuildConfig } from "../utils/database.js";
 
-export async function callback(interaction) {
+export interface RoleMenuSchema {
+    guild: string;
+    guildName: string;
+    guildIcon: string;
+    user: string;
+    username: string;
+    data: GuildConfig["roleMenu"]["options"];
+    interaction: Interaction;
+}
+
+export async function callback(interaction: Interaction) {
     const config = await client.database.guilds.read(interaction.guild.id);
     if (!config.roleMenu.enabled)
         return await interaction.reply({
@@ -25,9 +36,7 @@
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Roles")
-                    .setDescription(
-                        "There are no roles available. Please contact a staff member or try again later."
-                    )
+                    .setDescription("There are no roles available. Please contact a staff member or try again later.")
                     .setStatus("Danger")
                     .setEmoji("CONTROL.BLOCKCROSS")
             ],
@@ -39,8 +48,7 @@
         let code = "";
         let length = 5;
         let itt = 0;
-        const chars =
-            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+        const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
         let valid = false;
         while (!valid) {
             itt += 1;
@@ -66,14 +74,13 @@
             interaction: interaction
         };
         let up = true;
-        try {
-            const status = await fetch(client.config.baseUrl).then(
-                (res) => res.status
-            );
+        up = false; // FIXME: Role menu does not yet exist, so the web UI is never up
+        /*        try {
+            const status = await fetch(client.config.baseUrl).then((res) => res.status);
             if (status !== 200) up = false;
         } catch {
             up = false;
-        }
+        }*/
         m = await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
@@ -88,13 +95,8 @@
                         .setLabel("Online")
                         .setStyle("LINK")
                         .setDisabled(!up)
-                        .setURL(
-                            `${client.config.baseUrl}nucleus/rolemenu?code=${code}`
-                        ),
-                    new MessageButton()
-                        .setLabel("Manual")
-                        .setStyle("PRIMARY")
-                        .setCustomId("manual")
+                        .setURL(`${client.config.baseUrl}nucleus/rolemenu?code=${code}`),
+                    new MessageButton().setLabel("Manual").setStyle("PRIMARY").setCustomId("manual")
                 ])
             ]
         });
@@ -116,13 +118,9 @@
                     .setEmoji("GUILD.GREEN")
                     .setDescription(
                         `**${object.name}**` +
-                            (object.description
-                                ? `\n${object.description}`
-                                : "") +
+                            (object.description ? `\n${object.description}` : "") +
                             `\n\nSelect ${object.min}` +
-                            (object.min !== object.max
-                                ? ` to ${object.max}`
-                                : "") +
+                            (object.min !== object.max ? ` to ${object.max}` : "") +
                             ` role${object.max === 1 ? "" : "s"} to add.`
                     )
                     .setStatus("Success")
@@ -145,9 +143,7 @@
                                       .setLabel("Skip")
                                       .setStyle("SECONDARY")
                                       .setCustomId("skip")
-                                      .setEmoji(
-                                          getEmojiByName("CONTROL.RIGHT", "id")
-                                      )
+                                      .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
                               ]
                             : []
                     )
@@ -193,13 +189,9 @@
             });
         }
     }
-    let rolesToRemove = config.roleMenu.options
-        .map((o) => o.options.map((o) => o.role))
-        .flat();
+    let rolesToRemove = config.roleMenu.options.map((o) => o.options.map((o) => o.role)).flat();
     const memberRoles = interaction.member.roles.cache.map((r) => r.id);
-    rolesToRemove = rolesToRemove
-        .filter((r) => memberRoles.includes(r))
-        .filter((r) => !rolesToAdd.includes(r));
+    rolesToRemove = rolesToRemove.filter((r) => memberRoles.includes(r)).filter((r) => !rolesToAdd.includes(r));
     rolesToAdd = rolesToAdd.filter((r) => !memberRoles.includes(r));
     try {
         await interaction.member.roles.remove(rolesToRemove);
@@ -222,9 +214,7 @@
         embeds: [
             new EmojiEmbed()
                 .setTitle("Roles")
-                .setDescription(
-                    "Roles have been added. You may close this message."
-                )
+                .setDescription("Roles have been added. You may close this message.")
                 .setStatus("Success")
                 .setEmoji("GUILD.GREEN")
         ],
diff --git a/src/actions/tickets/create.ts b/src/actions/tickets/create.ts
index ca5147a..d6bf822 100644
--- a/src/actions/tickets/create.ts
+++ b/src/actions/tickets/create.ts
@@ -6,20 +6,11 @@
 
 function capitalize(s: string) {
     s = s.replace(/([A-Z])/g, " $1");
-    return s.length < 3
-        ? s.toUpperCase()
-        : s[0].toUpperCase() + s.slice(1).toLowerCase();
+    return s.length < 3 ? s.toUpperCase() : s[0].toUpperCase() + s.slice(1).toLowerCase();
 }
 
 export default async function (interaction) {
-    const {
-        log,
-        NucleusColors,
-        entry,
-        renderUser,
-        renderChannel,
-        renderDelta
-    } = client.logger;
+    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;
 
     const config = await client.database.guilds.read(interaction.guild.id);
     if (!config.tickets.enabled || !config.tickets.category) {
@@ -27,9 +18,7 @@
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Tickets are disabled")
-                    .setDescription(
-                        "Please enable tickets in the configuration to use this command."
-                    )
+                    .setDescription("Please enable tickets in the configuration to use this command.")
                     .setFooter({
                         text: interaction.member.permissions.has("MANAGE_GUILD")
                             ? "You can enable it by running /settings tickets"
@@ -41,17 +30,11 @@
             ephemeral: true
         });
     }
-    const category = interaction.guild.channels.cache.get(
-        config.tickets.category
-    ) as Discord.CategoryChannel;
+    const category = interaction.guild.channels.cache.get(config.tickets.category) as Discord.CategoryChannel;
     let count = 0;
     category.children.forEach((element) => {
         if (!(element.type === "GUILD_TEXT")) return;
-        if (
-            (element as Discord.TextChannel).topic.includes(
-                `${interaction.member.user.id}`
-            )
-        ) {
+        if ((element as Discord.TextChannel).topic.includes(`${interaction.member.user.id}`)) {
             if ((element as Discord.TextChannel).topic.endsWith("Active")) {
                 count++;
             }
@@ -76,8 +59,7 @@
     if (config.tickets.customTypes && config.tickets.useCustom) {
         ticketTypes = config.tickets.customTypes;
         custom = true;
-    } else if (config.tickets.types)
-        ticketTypes = toHexArray(config.tickets.types, tickets);
+    } else if (config.tickets.types) ticketTypes = toHexArray(config.tickets.types, tickets);
     else ticketTypes = [];
     let chosenType;
     let splitFormattedTicketTypes = [];
@@ -85,29 +67,17 @@
         let formattedTicketTypes = [];
         formattedTicketTypes = ticketTypes.map((type) => {
             if (custom) {
-                return new MessageButton()
-                    .setLabel(type)
-                    .setStyle("PRIMARY")
-                    .setCustomId(type);
+                return new MessageButton().setLabel(type).setStyle("PRIMARY").setCustomId(type);
             } else {
                 return new MessageButton()
                     .setLabel(capitalize(type))
                     .setStyle("PRIMARY")
                     .setCustomId(type)
-                    .setEmoji(
-                        getEmojiByName(
-                            "TICKETS." + type.toString().toUpperCase(),
-                            "id"
-                        )
-                    );
+                    .setEmoji(getEmojiByName("TICKETS." + type.toString().toUpperCase(), "id"));
             }
         });
         for (let i = 0; i < formattedTicketTypes.length; i += 5) {
-            splitFormattedTicketTypes.push(
-                new MessageActionRow().addComponents(
-                    formattedTicketTypes.slice(i, i + 5)
-                )
-            );
+            splitFormattedTicketTypes.push(new MessageActionRow().addComponents(formattedTicketTypes.slice(i, i + 5)));
         }
         const m = await interaction.reply({
             embeds: [
@@ -142,21 +112,12 @@
                     .setLabel(capitalize(type))
                     .setStyle(chosenType === type ? "SUCCESS" : "SECONDARY")
                     .setCustomId(type)
-                    .setEmoji(
-                        getEmojiByName(
-                            "TICKETS." + type.toString().toUpperCase(),
-                            "id"
-                        )
-                    )
+                    .setEmoji(getEmojiByName("TICKETS." + type.toString().toUpperCase(), "id"))
                     .setDisabled(true);
             }
         });
         for (let i = 0; i < formattedTicketTypes.length; i += 5) {
-            splitFormattedTicketTypes.push(
-                new MessageActionRow().addComponents(
-                    formattedTicketTypes.slice(i, i + 5)
-                )
-            );
+            splitFormattedTicketTypes.push(new MessageActionRow().addComponents(formattedTicketTypes.slice(i, i + 5)));
         }
         component.update({
             embeds: [
@@ -171,11 +132,7 @@
     } else {
         chosenType = null;
         await interaction.reply({
-            embeds: [
-                new EmojiEmbed()
-                    .setTitle("Create Ticket")
-                    .setEmoji("GUILD.TICKET.OPEN")
-            ],
+            embeds: [new EmojiEmbed().setTitle("Create Ticket").setEmoji("GUILD.TICKET.OPEN")],
             ephemeral: true,
             components: splitFormattedTicketTypes
         });
@@ -183,13 +140,7 @@
     const overwrites = [
         {
             id: interaction.member,
-            allow: [
-                "VIEW_CHANNEL",
-                "SEND_MESSAGES",
-                "ATTACH_FILES",
-                "ADD_REACTIONS",
-                "READ_MESSAGE_HISTORY"
-            ],
+            allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
             type: "member"
         }
     ] as Discord.OverwriteResolvable[];
@@ -201,31 +152,21 @@
     if (config.tickets.supportRole !== null) {
         overwrites.push({
             id: interaction.guild.roles.cache.get(config.tickets.supportRole),
-            allow: [
-                "VIEW_CHANNEL",
-                "SEND_MESSAGES",
-                "ATTACH_FILES",
-                "ADD_REACTIONS",
-                "READ_MESSAGE_HISTORY"
-            ],
+            allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
             type: "role"
         });
     }
 
     let c;
     try {
-        c = await interaction.guild.channels.create(
-            interaction.member.user.username,
-            {
-                type: "GUILD_TEXT",
-                topic: `${interaction.member.user.id} Active`,
-                parent: config.tickets.category,
-                nsfw: false,
-                permissionOverwrites:
-                    overwrites as Discord.OverwriteResolvable[],
-                reason: "Creating ticket"
-            }
-        );
+        c = await interaction.guild.channels.create(interaction.member.user.username, {
+            type: "GUILD_TEXT",
+            topic: `${interaction.member.user.id} Active`,
+            parent: config.tickets.category,
+            nsfw: false,
+            permissionOverwrites: overwrites as Discord.OverwriteResolvable[],
+            reason: "Creating ticket"
+        });
     } catch (e) {
         return await interaction.editReply({
             embeds: [
@@ -241,24 +182,15 @@
         await c.send({
             content:
                 `<@${interaction.member.user.id}>` +
-                (config.tickets.supportRole !== null
-                    ? ` • <@&${config.tickets.supportRole}>`
-                    : ""),
+                (config.tickets.supportRole !== null ? ` • <@&${config.tickets.supportRole}>` : ""),
             allowedMentions: {
                 users: [(interaction.member as Discord.GuildMember).id],
-                roles:
-                    config.tickets.supportRole !== null
-                        ? [config.tickets.supportRole]
-                        : []
+                roles: config.tickets.supportRole !== null ? [config.tickets.supportRole] : []
             }
         });
-        let content = interaction.options
-            ? interaction.options.getString("message") || ""
-            : "";
+        let content = interaction.options ? interaction.options.getString("message") || "" : "";
         if (content) content = `**Message:**\n> ${content}\n`;
-        const emoji = custom
-            ? ""
-            : getEmojiByName("TICKETS." + chosenType.toUpperCase());
+        const emoji = custom ? "" : getEmojiByName("TICKETS." + chosenType.toUpperCase());
         await c.send({
             embeds: [
                 new EmojiEmbed()
@@ -266,9 +198,7 @@
                     .setDescription(
                         `Ticket created by <@${interaction.member.user.id}>\n` +
                             `**Support type:** ${
-                                chosenType !== null
-                                    ? emoji + " " + capitalize(chosenType)
-                                    : "General"
+                                chosenType !== null ? emoji + " " + capitalize(chosenType) : "General"
                             }\n` +
                             `**Ticket ID:** \`${c.id}\`\n${content}\n` +
                             "Type `/ticket close` to close this ticket."
@@ -296,14 +226,8 @@
                 timestamp: new Date().getTime()
             },
             list: {
-                ticketFor: entry(
-                    interaction.member.user.id,
-                    renderUser(interaction.member.user)
-                ),
-                created: entry(
-                    new Date().getTime(),
-                    renderDelta(new Date().getTime())
-                ),
+                ticketFor: entry(interaction.member.user.id, renderUser(interaction.member.user)),
+                created: entry(new Date().getTime(), renderDelta(new Date().getTime())),
                 ticketChannel: entry(c.id, renderChannel(c))
             },
             hidden: {
@@ -318,9 +242,7 @@
         embeds: [
             new EmojiEmbed()
                 .setTitle("Create Ticket")
-                .setDescription(
-                    `Ticket created. You can view it here: <#${c.id}>`
-                )
+                .setDescription(`Ticket created. You can view it here: <#${c.id}>`)
                 .setStatus("Success")
                 .setEmoji("GUILD.TICKET.OPEN")
         ],
diff --git a/src/actions/tickets/delete.ts b/src/actions/tickets/delete.ts
index 6509c03..d692a1e 100644
--- a/src/actions/tickets/delete.ts
+++ b/src/actions/tickets/delete.ts
@@ -4,14 +4,7 @@
 import getEmojiByName from "../../utils/getEmojiByName.js";
 
 export default async function (interaction) {
-    const {
-        log,
-        NucleusColors,
-        entry,
-        renderUser,
-        renderChannel,
-        renderDelta
-    } = client.logger;
+    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;
 
     const config = await client.database.guilds.read(interaction.guild.id);
     let thread = false;
@@ -21,9 +14,7 @@
     if (
         !channel.parent ||
         config.tickets.category !== channel.parent.id ||
-        (thread
-            ? threadChannel.parent.parent.id !== config.tickets.category
-            : false)
+        (thread ? threadChannel.parent.parent.id !== config.tickets.category : false)
     ) {
         return interaction.reply({
             embeds: [
@@ -61,22 +52,10 @@
             list: {
                 ticketFor: entry(
                     channel.topic.split(" ")[0],
-                    renderUser(
-                        (
-                            await interaction.guild.members.fetch(
-                                channel.topic.split(" ")[0]
-                            )
-                        ).user
-                    )
+                    renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)
                 ),
-                deletedBy: entry(
-                    interaction.member.user.id,
-                    renderUser(interaction.member.user)
-                ),
-                deleted: entry(
-                    new Date().getTime(),
-                    renderDelta(new Date().getTime())
-                )
+                deletedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
+                deleted: entry(new Date().getTime(), renderDelta(new Date().getTime()))
             },
             hidden: {
                 guild: interaction.guild.id
@@ -109,16 +88,8 @@
         ] as Discord.OverwriteResolvable[];
         if (config.tickets.supportRole !== null) {
             overwrites.push({
-                id: interaction.guild.roles.cache.get(
-                    config.tickets.supportRole
-                ),
-                allow: [
-                    "VIEW_CHANNEL",
-                    "SEND_MESSAGES",
-                    "ATTACH_FILES",
-                    "ADD_REACTIONS",
-                    "READ_MESSAGE_HISTORY"
-                ],
+                id: interaction.guild.roles.cache.get(config.tickets.supportRole),
+                allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
                 type: "role"
             });
         }
@@ -136,22 +107,10 @@
             list: {
                 ticketFor: entry(
                     channel.topic.split(" ")[0],
-                    renderUser(
-                        (
-                            await interaction.guild.members.fetch(
-                                channel.topic.split(" ")[0]
-                            )
-                        ).user
-                    )
+                    renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)
                 ),
-                closedBy: entry(
-                    interaction.member.user.id,
-                    renderUser(interaction.member.user)
-                ),
-                closed: entry(
-                    new Date().getTime(),
-                    renderDelta(new Date().getTime())
-                ),
+                closedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
+                closed: entry(new Date().getTime(), renderDelta(new Date().getTime())),
                 ticketChannel: entry(channel.id, renderChannel(channel))
             },
             hidden: {
@@ -184,12 +143,7 @@
                                       .setLabel("Create Transcript and Delete")
                                       .setStyle("PRIMARY")
                                       .setCustomId("createtranscript")
-                                      .setEmoji(
-                                          getEmojiByName(
-                                              "CONTROL.DOWNLOAD",
-                                              "id"
-                                          )
-                                      )
+                                      .setEmoji(getEmojiByName("CONTROL.DOWNLOAD", "id"))
                               ]
                             : []
                     )
@@ -219,8 +173,7 @@
         }
     });
     if (deleted) {
-        const { log, NucleusColors, entry, renderUser, renderDelta } =
-            member.client.logger;
+        const { log, NucleusColors, entry, renderUser, renderDelta } = member.client.logger;
         const data = {
             meta: {
                 type: "ticketPurge",
@@ -233,10 +186,7 @@
             list: {
                 ticketFor: entry(member, renderUser(member)),
                 deletedBy: entry(null, "Member left server"),
-                deleted: entry(
-                    new Date().getTime(),
-                    renderDelta(new Date().getTime())
-                ),
+                deleted: entry(new Date().getTime(), renderDelta(new Date().getTime())),
                 ticketsDeleted: deleted
             },
             hidden: {
