From 79db6a670e62e7716aaa31af2cf4cf59ffbb8321 Mon Sep 17 00:00:00 2001 From: KieranRobson Date: Wed, 20 Sep 2023 22:47:12 +0100 Subject: [PATCH] feat: Add member request to intro message #206 --- src/events/guildMemberAdd.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/events/guildMemberAdd.js b/src/events/guildMemberAdd.js index 87b9c8e..6898599 100644 --- a/src/events/guildMemberAdd.js +++ b/src/events/guildMemberAdd.js @@ -3,10 +3,19 @@ const client = require('../index'); client.on('guildMemberAdd', async (guildmember) => { const welcomechannel = client.channels.cache.get('427875246801027072'); const guild = client.guilds.cache.get('427865794467069962'); + const roleChannel = client.channels.cache.find( + (channel) => channel.name === 'roles' + ); + const introductionChannel = client.channels.cache.find( + (channel) => channel.name === 'introductions' + ); + const paidMemberRequestChannel = client.channels.cache.find( + (channel) => channel.name === 'paid-member-request' + ); if (guild == guildmember.guild.id) { welcomechannel.send({ - content: ` Welcome! **${guildmember.user}** has just joined the server! Grab some roles from <#427873938333499404> and let us know who you are within <#427874873898041346>`, + content: `Hi **${guildmember.user}**, welcome to the server! Please be sure to fill out your roles in ${roleChannel}, submit a paid member request in ${paidMemberRequestChannel} and introduce yourself ${introductionChannel}`, }); } });