diff --git a/src/commands/mod/nick.ts b/src/commands/mod/nick.ts
new file mode 100644
index 0000000..d23751c
--- /dev/null
+++ b/src/commands/mod/nick.ts
@@ -0,0 +1,25 @@
+import { CommandInteraction, GuildMember } from "discord.js";
+import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
+import { WrappedCheck } from "jshaiku";
+import confirmationMessage from "../../utils/confirmationMessage.js";
+import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import keyValueList from "../../utils/generateKeyValueList.js";
+
+const command = (builder: SlashCommandSubcommandBuilder) =>
+    builder
+    .setName("nick")
+    .setDescription("Changes a users nickname")
+    .addUserOption(option => option.setName("user").setDescription("The user to change").setRequired(true))
+    .addStringOption(option => option.setName("name").setDescription("The name to set").setRequired(false))
+    .addStringOption(option => option.setName("notify").setDescription("If the user should get a message when their nickname is changed | Default no").setRequired(false)
+        .addChoices([["Yes", "yes"], ["No", "no"]])
+    )
+
+const callback = async (interaction: CommandInteraction) => {
+}
+
+const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
+    return true;
+}
+
+export { command, callback, check };
\ No newline at end of file
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
