2023-10-10 21:33:11 -05:00
|
|
|
import {
|
|
|
|
|
AttachmentBuilder,
|
|
|
|
|
EmbedBuilder,
|
|
|
|
|
GuildMember,
|
|
|
|
|
TextChannel,
|
|
|
|
|
} from 'discord.js';
|
2023-10-10 21:37:17 -05:00
|
|
|
import markdownEscape from 'markdown-escape';
|
2023-04-20 13:43:35 +00:00
|
|
|
import discord from '../../discord.json' assert { type: 'json' };
|
2023-07-11 19:54:57 +00:00
|
|
|
import { ACCENT_COLOR } from '../constants/colors';
|
2023-04-20 13:37:10 +00:00
|
|
|
|
|
|
|
|
export default async function (member: GuildMember) {
|
2023-05-19 23:36:02 +00:00
|
|
|
if (member.guild.id === discord.sklld_guild_id) {
|
2023-04-26 23:43:13 +00:00
|
|
|
await (
|
2023-05-19 23:36:02 +00:00
|
|
|
member.guild.channels.cache.get(
|
|
|
|
|
discord.sklld_verify_channel,
|
|
|
|
|
) as TextChannel
|
2023-04-26 23:43:13 +00:00
|
|
|
).send({
|
|
|
|
|
content: member.toString(),
|
|
|
|
|
embeds: [
|
|
|
|
|
new EmbedBuilder()
|
2023-05-28 16:56:15 +00:00
|
|
|
.setColor(ACCENT_COLOR)
|
2023-10-10 21:37:17 -05:00
|
|
|
.setTitle(`Welcome, ${markdownEscape(member.user.displayName)}`)
|
2023-04-26 23:43:13 +00:00
|
|
|
.setDescription(
|
2023-10-10 21:37:17 -05:00
|
|
|
`Welcome to the Skilled server! To continue, please use the \`/link\` command.`,
|
2023-04-26 23:43:13 +00:00
|
|
|
),
|
|
|
|
|
],
|
2023-10-10 21:33:11 -05:00
|
|
|
files: [new AttachmentBuilder('https://i.imgur.com/2p6GFgC.gif')],
|
2023-04-26 23:43:13 +00:00
|
|
|
});
|
|
|
|
|
}
|
2023-04-20 13:37:10 +00:00
|
|
|
}
|