Welcome to the Discord Welcome Package! This package is designed to help you easily send customized welcome messages to new members joining your Discord server using discord.js
.
- Send welcome messages with customizable embed options
- Easy to integrate with your existing Discord bot
To install the package, run the following command:
npm install welcomerpackage
The sendWelcomeMessage
function is used to send a customized welcome message to a new member joining your Discord server.
-
member
(GuildMember): The member who has joined the server. -
options
(WelcomeMessageOptions): An optional object to customize the welcome message embed.
The WelcomeMessageOptions
interface allows you to customize the welcome message embed:
-
color
(string): The color of the embed. Default is#0099ff
. -
title
(string): The title of the embed. Default isWelcome!
. -
description
(string): The description of the embed. Default isWelcome to the server, {username}!
. -
thumbnailUrl
(string): The URL of the thumbnail image. Default is the user's avatar URL. -
channelId
(string): The ID of the channel where the welcome message will be sent. Default is the system channel. -
imageUrl
(string): The URL of the image to be included in the embed.
import { Client, GatewayIntentBits } from 'discord.js';
import { sendWelcomeMessage } from 'welcomer-pack';
import { WelcomeMessageOptions } from 'welcomer-pack/types';
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
],
});
client.on('guildMemberAdd', (member) => {
const options: WelcomeMessageOptions = {
title: 'Welcome to our server!',
description: 'We hope you enjoy your stay.',
thumbnailUrl: 'https://example.com/welcome.png',
color: '#00ff00',
channelId: '123456789012345678',
imageUrl: 'https://example.com/image.png'
};
sendWelcomeMessage(member, options);
});
client.login('your-bot-token');
- Discord : discord.gg/hTkzz2ZzJA
- Instagram : @nsl2j
- GitHub : 1AhmedS
- X : @nsl2j
- LinkedIn: 1AhmedS
If you need support or have any questions, you can contact me at: