npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

trixxy-welcome

v1.0.0

Published

A Discord.js package for sending customizable welcome messages with images.

Downloads

7

Readme

trixxy-welcome

trixxy-welcome is a Discord.js package designed to send customizable welcome messages with dynamically generated images to new members joining your Discord server. It leverages discord.js for Discord API interaction and canvas for image manipulation, allowing you to create personalized welcome banners.

Features

  • Customizable Welcome Messages: Define your own welcome text with placeholders for user and guild names.
  • Dynamic Welcome Images: Generate welcome images with the new member's avatar, custom background, and text.
  • Easy Integration: Simple to set up and integrate into your existing Discord.js bot.

Installation

To install the package, use npm:

npm install trixxy-welcome

Required Dependencies:

  • discord.js (v14.x or higher)
  • canvas (v2.x or higher)

Make sure you have canvas and its dependencies properly installed. Refer to the node-canvas documentation for platform-specific installation instructions.

Usage

Here's how to use TrixxyWelcome in your Discord.js bot:

const { Client, GatewayIntentBits } = require('discord.js');
const TrixxyWelcome = require('trixxy-welcome');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMembers,
    ],
});

client.on('ready', () => {
    console.log(`Logged in as ${client.user.tag}!`);

    // Initialize TrixxyWelcome
    const welcomeHandler = new TrixxyWelcome(client, {
        channelId: 'YOUR_WELCOME_CHANNEL_ID', // Replace with your welcome channel ID
        welcomeMessage: 'Welcome, {user}! Enjoy your stay in {guild}!',
        welcomeImage: 'https://example.com/your-custom-background.png', // Optional: URL to a background image
        backgroundColor: '#2c2f33', // Optional: Hex color for background
        textColor: '#ffffff',       // Optional: Hex color for text
        font: '40px Arial',         // Optional: Font style for text
        avatarSize: 150,            // Optional: Size of the user's avatar on the image
        avatarBorderColor: '#7289da', // Optional: Color of the avatar border
        avatarBorderWidth: 7        // Optional: Width of the avatar border
    });

    // You don't need to call any methods explicitly after initialization.
    // The package automatically listens for 'guildMemberAdd' events.
});

client.login('YOUR_BOT_TOKEN'); // Replace with your bot token

TrixxyWelcome Class

constructor(client, options)

Initializes the TrixxyWelcome handler.

  • client (required): The Discord.js Client instance.
  • options (optional): An object containing configuration options:
    • channelId (string): The ID of the channel where welcome messages should be sent. Required for functionality.
    • welcomeMessage (string): The message to display. Use {user} for the new member's username and {guild} for the guild name. Default: 'Welcome {user} to {guild}!'.
    • welcomeImage (string): A URL or local path to an image to use as the background for the welcome banner. Default: null (uses solid color background).
    • backgroundColor (string): Hex color code for the background if no welcomeImage is provided. Default: '#1a1a1a'.
    • textColor (string): Hex color code for the welcome message text. Default: '#ffffff'.
    • font (string): CSS-like font string for the welcome message text (e.g., '30px sans-serif'). Default: '30px sans-serif'.
    • avatarSize (number): The size (width and height) of the user's avatar on the welcome image in pixels. Default: 128.
    • avatarBorderColor (string): Hex color code for the border around the user's avatar. Default: '#00b0f0'.
    • avatarBorderWidth (number): The width of the avatar border in pixels. Default: 5.

Important Notes

  • Ensure your bot has the GuildMembers intent enabled in the Discord Developer Portal and in your Client initialization.
  • The bot must have permissions to View Channel and Send Messages in the specified channelId.
  • For canvas to work correctly, you might need to install additional system dependencies. Please refer to the node-canvas documentation for detailed instructions specific to your operating system.

License

This project is licensed under the ISC License.