diff --git a/src/commands/settings/_meta.ts b/src/commands/settings/_meta.ts
index 76e570d..666dbf4 100644
--- a/src/commands/settings/_meta.ts
+++ b/src/commands/settings/_meta.ts
@@ -4,6 +4,8 @@
 const description = "Change bot settings";
 
 
-const subcommand = await command(name, description, "settings")
+const subcommand = await command(name, description, "settings", undefined, undefined, undefined, [
+    "ManageGuild"
+])
 
 export { name, description, subcommand as command};
diff --git a/src/commands/settings/stats.ts b/src/commands/settings/stats.ts
index f19998a..a768cb8 100644
--- a/src/commands/settings/stats.ts
+++ b/src/commands/settings/stats.ts
@@ -224,6 +224,16 @@
     return true;
 };
 
+const autocomplete = async (interaction: AutocompleteInteraction): Promise<string[]> => {
+    if (!interaction.guild) return [];
+    const prompt = interaction.options.getString("tag");
+    // generateStatsChannelAutocomplete(int.options.getString("name") ?? "")
+    const results = generateStatsChannelAutocomplete(prompt ?? "");
+    return results;
+};
+
+
+
 export { command };
 export { callback };
 export { check };
diff --git a/src/commands/settings/welcome.ts b/src/commands/settings/welcome.ts
index 5284f8a..7f02cd7 100644
--- a/src/commands/settings/welcome.ts
+++ b/src/commands/settings/welcome.ts
@@ -7,7 +7,8 @@
     ButtonBuilder,
     MessageComponentInteraction,
     Role,
-    ButtonStyle
+    ButtonStyle,
+    AutocompleteInteraction
 } from "discord.js";
 import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
@@ -204,7 +205,7 @@
                     .setEmoji("CHANNEL.TEXT.CREATE")
             ],
             components: [
-                new ActionRowBuilder().addComponents([
+                new ActionRowBuilder<ButtonBuilder>().addComponents([
                     new ButtonBuilder()
                         .setLabel(lastClicked == "clear-message" ? "Click again to confirm" : "Clear Message")
                         .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
@@ -296,11 +297,42 @@
 
 const check = (interaction: CommandInteraction) => {
     const member = interaction.member as Discord.GuildMember;
-    if (!member.permissions.has("MANAGE_GUILD"))
+    if (!member.permissions.has("ManageGuild"))
         throw new Error("You must have the *Manage Server* permission to use this command");
     return true;
 };
 
-export { command };
-export { callback };
-export { check };
+const autocomplete = async (interaction: AutocompleteInteraction): Promise<string[]> => {
+    const validReplacements = ["serverName", "memberCount", "memberCount:bots", "memberCount:humans"]
+    if (!interaction.guild) return [];
+    const prompt = interaction.options.getString("message");
+    const autocompletions = [];
+    if ( prompt === null ) {
+        for (const replacement of validReplacements) {
+            autocompletions.push(`{${replacement}}`);
+        };
+        return autocompletions;
+    };
+    const beforeLastOpenBracket = prompt.match(/(.*){[^{}]{0,15}$/);
+    const afterLastOpenBracket = prompt.match(/{[^{}]{0,15}$/);
+    if (beforeLastOpenBracket !== null) {
+        if (afterLastOpenBracket !== null) {
+            for (const replacement of validReplacements) {
+                if (replacement.startsWith(afterLastOpenBracket[0].slice(1))) {
+                    autocompletions.push(`${beforeLastOpenBracket[1]}{${replacement}}`);
+                }
+            }
+        } else {
+            for (const replacement of validReplacements) {
+                autocompletions.push(`${beforeLastOpenBracket[1]}{${replacement}}`);
+            }
+        }
+    } else {
+        for (const replacement of validReplacements) {
+            autocompletions.push(`${prompt} {${replacement}}`);
+        }
+    }
+    return autocompletions;
+};
+
+export { command, callback, check, autocomplete };
