wsb-bot / src /systems /welcome.js
APRK01
Initial commit: WSB Discord Bot
3c7e34b
const { createEmbed } = require('../utils/embeds');
const { Colors } = require('../config');
/**
* Handle new member join β€” send a welcome embed via DM and optionally in a channel.
*/
async function handleMemberJoin(member, client) {
// Build welcome DM embed
const embed = createEmbed({
title: '🟣 Welcome to Wyvern Softworks',
description: [
`Hey **${member.user.username}**, welcome to the server!\n`,
'> Before you get started, here\'s what you need to do:\n',
'**1.** Read the πŸ“œγƒ»rules and βš οΈγƒ»disclaimer channels',
'**2.** Head to βœ…γƒ»verify and react to get verified',
'**3.** Once verified, the full server will unlock\n',
'```',
'πŸ”’ Most channels are locked until verification',
'🎫 Need help? Open a ticket after verifying',
'πŸ’œ Boost the server for exclusive perks',
'```\n',
'> Enjoy your stay β€” **Wyvern Softworks** πŸ‰',
].join('\n'),
color: Colors.PRIMARY,
footer: 'WSB β€” Wyvern Softworks Bot',
});
// Try to send DM
try {
await member.send({ embeds: [embed] });
} catch {
// User has DMs disabled β€” silently ignore
}
}
/**
* Handle member leave (optional logging).
*/
async function handleMemberLeave(member, client) {
const { log } = require('./logger');
await log(client, {
title: 'πŸ‘‹ Member Left',
description: `**${member.user.tag}** (${member.id}) has left the server.`,
color: Colors.WARNING,
});
}
module.exports = { handleMemberJoin, handleMemberLeave };