diff --git a/src/events/commandError.ts b/src/events/commandError.ts
index 6d3672e..8edb480 100644
--- a/src/events/commandError.ts
+++ b/src/events/commandError.ts
@@ -5,7 +5,7 @@
 export async function callback(client, interaction, error) {
     if (interaction.replied || interaction.deferred) {
         await interaction.followUp({embeds: [new EmojiEmbed()
-            .setTitle("Something went")
+            .setTitle("Something went wrong")
             .setDescription(error.message ?? error.toString())
             .setStatus("Danger")
             .setEmoji("CONTROL.BLOCKCROSS")
diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index eaf4fea..a4bb8c3 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -16,8 +16,16 @@
     return fuse.slice(0, 25).map(option => ({name: option.item, value: option.item}))
 }
 
-const validReplacements = ["serverName", "memberCount", "memberCount:bots", "memberCount:humans"]
 function generateStatsChannelAutocomplete(typed) {
+    const validReplacements = ["serverName", "memberCount", "memberCount:bots", "memberCount:humans"]
+    let autocompletions = []
+    const beforeLastOpenBracket = typed.match(/(.*){[^{}]{0,15}$/)
+    if (beforeLastOpenBracket !== null) { for (let replacement of validReplacements) { autocompletions.push(`${beforeLastOpenBracket[1]} {${replacement}}`) } }
+    else { for (let replacement of validReplacements) { autocompletions.push(`${typed} {${replacement}}`) } }
+    return getAutocomplete(typed, autocompletions)
+}
+function generateWelcomeMessageAutocomplete(typed) {
+    const validReplacements = ["serverName", "memberCount", "memberCount:bots", "memberCount:humans", "member:mention", "member:name"]
     let autocompletions = []
     const beforeLastOpenBracket = typed.match(/(.*){[^{}]{0,15}$/)
     if (beforeLastOpenBracket !== null) { for (let replacement of validReplacements) { autocompletions.push(`${beforeLastOpenBracket[1]} {${replacement}}`) } }
@@ -39,6 +47,7 @@
         switch (`${interaction.commandName} ${interaction.options.getSubcommandGroup(false)} ${interaction.options.getSubcommand(false)}`) {
             case `tag null null`: { return interaction.respond(getAutocomplete(interaction.options.getString("tag"), (await tagAutocomplete(interaction)))) }
             case `settings null stats`: { return interaction.respond(generateStatsChannelAutocomplete(interaction.options.getString("name"))) }
+            case `settings null welcome`: { return interaction.respond(generateWelcomeMessageAutocomplete(interaction.options.getString("message"))) }
         }
     }
 }
