diff --git a/src/automations/welcome.ts b/src/automations/welcome.ts
new file mode 100644
index 0000000..6505265
--- /dev/null
+++ b/src/automations/welcome.ts
@@ -0,0 +1,44 @@
+import log from '../utils/log.js'
+import readConfig from '../utils/readConfig.js'
+import convertCurlyBracketString from '../utils/convertCurlyBracketString.js'
+
+export async function callback(_, member) {
+	if (member.bot) return
+    let config = await readConfig(member.guild.id);
+    if (!config.welcome.enabled) return
+
+    if (!config.welcome.verificationRequired.role) {
+        if (config.welcome.welcomeRole) {
+            try {
+                await member.roles.add(config.welcome.welcomeRole)
+            } catch (err) {
+                console.error(err)
+            }
+        }
+    }
+
+
+    if (!config.welcome.verificationRequired.message && config.welcome.channel) {
+        let string = config.welcome.message
+        if (string) {
+            string = await convertCurlyBracketString(string, member.id, member.displayName, member.guild.name, member.guild.members)
+
+            if (config.welcome.channel === 'dm') {
+                try {
+                    await member.send(string)
+                } catch (err) {
+                    console.error(err)
+                }
+            } else {
+                let channel = await member.client.channels.fetch(config.welcome.channel)
+                if (channel.guild.id !== member.guild.id) return
+                if (!channel) return // TODO: Notify mods
+                try {
+                    await channel.send(string)
+                } catch (err) {
+                    console.error(err)
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
