welcomerpackage
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Discord Welcome Package V1.0.2

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.

Features

  • Send welcome messages with customizable embed options
  • Easy to integrate with your existing Discord bot

Installation

To install the package, run the following command:

npm install welcomerpackage

Function: sendWelcomeMessage

The sendWelcomeMessage function is used to send a customized welcome message to a new member joining your Discord server.

Parameters

  • member (GuildMember): The member who has joined the server.
  • options (WelcomeMessageOptions): An optional object to customize the welcome message embed.

WelcomeMessageOptions

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 is Welcome!.
  • description (string): The description of the embed. Default is Welcome 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.

Example

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'); 

Contact

Support

If you need support or have any questions, you can contact me at:

Donate 💌

GitHub Follow Buy Me a Coffee

/welcomerpackage/

    Package Sidebar

    Install

    npm i welcomerpackage

    Weekly Downloads

    18

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.32 kB

    Total Files

    6

    Last publish

    Collaborators

    • 1ahmeds