Need help adding code to my bot

this is what i have so far:
where would i put this:
bot.on(“guildCreate”, guild => {
console.log(“Joined a new guild: " +;
guild.members.forEach(member => {
member.send(”> Hey! want free nitro just for inviting a few members? want crazy giveaways with thousands of accounts? then come join Tears giveaway and nitro server! we have daily giveaways and a great community
im trying to make it auto send
as soon as the bot is added to a server
or when new people join

Hey @viiralelite,

The guildCreate event is when when the bot joins a server. Use guildMemberAdd to find when a user joins the server.