diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index aa25b69..8f9f688 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -11,11 +11,9 @@
     MessageComponentInteraction,
     StringSelectMenuBuilder,
     Role,
-    StringSelectMenuInteraction,
     ButtonStyle,
     TextInputBuilder,
     ButtonComponent,
-    StringSelectMenuComponent,
     ModalSubmitInteraction,
     APIMessageComponentEmoji
 } from "discord.js";
@@ -390,14 +388,14 @@
                     innerTimedOut = true;
                     continue;
                 }
-                if ((i.component as StringSelectMenuComponent).customId === "template") {
+                if (i.isStringSelectMenu() && i.customId === "template") {
                     i.deferUpdate();
                     await interaction.channel!.send({
                         embeds: [
                             new EmojiEmbed()
-                                .setTitle(ticketMessages[parseInt((i as StringSelectMenuInteraction).values[0]!)]!.label)
+                                .setTitle(ticketMessages[parseInt(i.values[0]!)]!.label)
                                 .setDescription(
-                                    ticketMessages[parseInt((i as StringSelectMenuInteraction).values[0]!)]!.description
+                                    ticketMessages[parseInt(i.values[0]!)]!.description
                                 )
                                 .setStatus("Success")
                                 .setEmoji("GUILD.TICKET.OPEN")
@@ -643,16 +641,16 @@
             timedOut = true;
             continue;
         }
-        if ((i.component as StringSelectMenuComponent).customId === "types") {
+        if (i.isStringSelectMenu() && i.customId === "types") {
             i.deferUpdate();
-            const types = toHexInteger((i as StringSelectMenuInteraction).values, ticketTypes);
+            const types = toHexInteger(i.values, ticketTypes);
             await client.database.guilds.write(interaction.guild!.id, {
                 "tickets.types": types
             });
             data.types = types;
-        } else if ((i.component as StringSelectMenuComponent).customId === "removeTypes") {
+        } else if (i.isStringSelectMenu() && i.customId === "removeTypes") {
             i.deferUpdate();
-            const types = (i as StringSelectMenuInteraction).values;
+            const types = i.values;
             let customTypes = data.customTypes;
             if (customTypes) {
                 customTypes = customTypes.filter((t) => !types.includes(t));
@@ -708,6 +706,7 @@
             } catch (e) {
                 continue;
             }
+            if (!out || out.isButton()) continue;
             out = out as ModalSubmitInteraction;
             let toAdd = out.fields.getTextInputValue("type");
             if (!toAdd) {
