diff --git a/src/commands/mod/info.ts b/src/commands/mod/info.ts
index 61a01e2..6b5c81e 100644
--- a/src/commands/mod/info.ts
+++ b/src/commands/mod/info.ts
@@ -12,9 +12,8 @@
     ButtonStyle,
     StringSelectMenuInteraction,
     TextInputStyle,
-    APIMessageComponentEmoji
 } from "discord.js";
-import { SlashCommandSubcommandBuilder, StringSelectMenuOptionBuilder } from "@discordjs/builders";
+import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import client from "../../utils/client.js";
@@ -158,26 +157,19 @@
         let components: (ActionRowBuilder<Discord.StringSelectMenuBuilder> | ActionRowBuilder<ButtonBuilder>)[] = []
         if (openFilterPane) components = components.concat([
             new ActionRowBuilder<Discord.StringSelectMenuBuilder>().addComponents(
-                new Discord.StringSelectMenuBuilder().setOptions(
-                    // ...Object.entries(types).map(([key, value]) => new StringSelectMenuOptionBuilder()
-                    //     .setLabel(value.text)
-                    //     .setValue(key)
-                    //     .setDefault(filteredTypes.includes(key))
-                    //     .setEmoji(client.emojis.resolve(getEmojiByName(value.emoji, "id"))! as APIMessageComponentEmoji)
-                    // )
-                    ...Object.entries(types).map(([key, value]) => ({
-                        label: value.text,
-                        value: key,
-                        default: filteredTypes.includes(key),
-                        emoji: client.emojis.resolve(getEmojiByName(value.emoji, "id"))! as APIMessageComponentEmoji
-                    }))
-                )
-                .setMinValues(1)
-                .setMaxValues(Object.keys(types).length)
-                .setCustomId("filter")
-                .setPlaceholder("Select events to show")
-            )
-        ])
+                new Discord.StringSelectMenuBuilder()
+                    .setMinValues(1)
+                    .setMaxValues(Object.keys(types).length)
+                    .setCustomId("filter")
+                    .setPlaceholder("Select events to show")
+                    .setOptions(...Object.entries(types).map(([key, value]) => new Discord.StringSelectMenuOptionBuilder()
+                        .setLabel(value.text)
+                        .setValue(key)
+                        .setDefault(filteredTypes.includes(key))
+                        // @ts-expect-error
+                        .setEmoji(getEmojiByName(value.emoji, "id"))  // FIXME: This gives a type error but is valid
+            )))
+        ]);
         components = components.concat([new ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
             new ButtonBuilder()
                 .setCustomId("prevYear")
@@ -188,7 +180,10 @@
                 .setCustomId("prevPage")
                 .setLabel("Previous page")
                 .setStyle(ButtonStyle.Primary),
-            new ButtonBuilder().setCustomId("today").setLabel("Today").setStyle(ButtonStyle.Primary),
+            new ButtonBuilder()
+                .setCustomId("today")
+                .setLabel("Today")
+                .setStyle(ButtonStyle.Primary),
             new ButtonBuilder()
                 .setCustomId("nextPage")
                 .setLabel("Next page")
