Files
blitzkit/src/behaviors/guildMemberAdd.ts
T

21 lines
758 B
TypeScript
Raw Normal View History

2023-04-20 13:37:10 +00:00
import { EmbedBuilder, GuildMember, TextChannel } from 'discord.js';
import discord from '../../discord.json' assert { type: 'json' };
2023-04-22 01:18:07 +00:00
import { SKILLED_COLOR } from '../constants/colors.js';
2023-04-20 13:37:10 +00:00
export default async function (member: GuildMember) {
console.log(`${member.user.tag} joined`);
await (
member.guild.channels.cache.get(discord.verify_channel) as TextChannel
2023-04-20 13:37:10 +00:00
).send({
2023-04-22 01:51:23 +00:00
content: member.toString(),
2023-04-20 13:37:10 +00:00
embeds: [
new EmbedBuilder()
2023-04-22 01:18:07 +00:00
.setColor(SKILLED_COLOR)
2023-04-20 13:37:10 +00:00
.setTitle(`Welcome ${member.user.username}`)
.setDescription(
2023-04-23 00:59:08 +00:00
`Welcome to the Skilled server, **${member.user.username}**! To continue, please use the \`/verify\` command.\n\nExample: \`/verify Europe Sabina244\``,
2023-04-20 13:37:10 +00:00
),
],
});
}