diff --git a/src/commands/settings/menu.ts b/src/commands/settings/menu.ts
new file mode 100644
index 0000000..c7269c7
--- /dev/null
+++ b/src/commands/settings/menu.ts
@@ -0,0 +1,53 @@
+import { CommandInteraction, MessageEmbed, MessageSelectMenu } from "discord.js";
+import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
+import { WrappedCheck } from "jshaiku";
+import readConfig from "../../utils/readConfig.js";
+import { toHexArray, toHexInteger, logs } from "../../utils/calculate.js"
+import { capitalize } from "../../utils/generateKeyValueList.js";
+
+const command = (builder: SlashCommandSubcommandBuilder) =>
+    builder
+    .setName("menu")
+    .setDescription("Shows a full UI of all settings")
+
+const callback = async (interaction: CommandInteraction) => {
+    return
+    let config = await readConfig(interaction.guild.id);
+
+    let currentValues = toHexArray(config.logging.log.toLog);
+
+    let toLogDropdownOptions = []
+
+    for(let i of logs) {
+        if(currentValues.includes(i)) {
+            toLogDropdownOptions.push({
+                name: capitalize(i),
+                value: i,
+                emoji: "TICK"
+            })
+        } else {
+            toLogDropdownOptions.push({
+                label: capitalize(i),
+                value: i,
+                emoji: "CROSS"
+            })
+        }
+    }
+
+    let toLogDropdown = new MessageSelectMenu()
+        .setCustomId("tolog")
+        .setMaxValues(22)
+        .addOptions()
+
+    let embed = new MessageEmbed()
+
+    interaction.reply("Command incomplete [settings/all]");
+}
+
+const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
+    return true;
+}
+
+export { command };
+export { callback };
+export { check };
\ No newline at end of file
