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

@ienznotfound/generateuserlevelupandprofiles

v1.0.405

Published

<div align="center"> <h1>🌟 Generate User Level Up & Profiles</h1> <p><strong>A powerful, highly customizable, and aesthetic Canvas generator for Discord Bot Profile and Level-Up Cards.</strong></p> </div>

Readme

Create stunning, high-resolution user profile cards and level-up notifications with zero CSS/HTML required. Built purely on @napi-rs/canvas for blazing fast performance, featuring automatic emoji support, auto-scaling text, and an integrated image uploader!


✨ Features

  • 🎨 Premium Aesthetic UI: Features a beautiful floating glassmorphism card over your background image, complete with drop shadows and rounded corners.
  • ✨ Neon Gradients: Avatar borders and progress bars use vibrant linear gradients with glowing neon shadows for a futuristic Discord bot feel.
  • πŸ–ΌοΈ Auto-Circular Avatars: Pass any image URL, and we'll automatically crop it into a perfect circle with a gradient border.
  • πŸ”  Auto-Scaling Text: Never worry about long usernames! Text automatically scales down to fit the canvas perfectly without overflowing.
  • πŸ˜‚ Native Emoji Support: Out-of-the-box support for OS emojis (Segoe UI Emoji, Apple Color Emoji, Noto Color Emoji).
  • ☁️ Built-in Auto Uploader (Optional): Want to save bandwidth? Use .uploadOptions('uploader') to directly upload the generated image to uguu.se (with fallback to catbox.moe) and get a direct URL string back!

πŸ“¦ Installation

Install via npm:

npm install @ienznotfound/generateuserlevelupandprofiles

πŸš€ Quick Start & Examples

1. πŸͺͺ Generating a Profile Card

The profiles class is designed to show a user's current rank, level, and EXP progress.

const fs = require('fs');
const { profiles } = require('@ienznotfound/generateuserlevelupandprofiles');

async function buildProfile() {
  const profileImageBuffer = await new profiles()
    // 1. Set the background (URL or Local Path)
    .addBackground('https://example.com/aesthetic-bg.png')
    
    // 2. Set the user's avatar
    .addAvatar('https://example.com/user-avatar.jpg')
    
    // 3. Set the Level Number (Automatically formats to "Level X")
    .addLevel(42)
    
    // 4. Set the EXP Tracker Text
    .addCurrentExp('EXP : 7,500 / 10,000')
    
    // 5. Draw the Progress Bar (Provide a percentage from 0 to 100)
    .addProgressBar(75) 
    
    // 6. Generate the image as a Local Buffer (Default)
    .uploadOptions('local') 
    .generate();
    
  // Save or send the buffer directly to Discord!
  fs.writeFileSync('my-profile.png', profileImageBuffer);
  console.log('Profile card saved successfully!');
}

buildProfile();

2. πŸŽ‰ Generating a Level-Up Card (With Auto Uploader)

The levelup class is tailored for congratulatory messages when a user levels up. In this example, we use the uploader option to instantly get a web URL instead of a Buffer!

const { levelup } = require('@ienznotfound/generateuserlevelupandprofiles');

async function buildLevelUp() {
  try {
    const uploadedImageUrl = await new levelup()
      .addBackground('https://example.com/epic-bg.png')
      .addAvatar('https://example.com/user-avatar.jpg')
      
      // Custom Congratulations Text
      .addLevelUpText('πŸŽ‰ Selamat! Kamu Naik Ke Level 43! πŸ₯³')
      
      // EXP Tracker Text
      .addProgress('EXP: 0 / 15,000')
      
      // Level Transition (Before -> Now)
      .addLevelTransition(42, 43) 
      
      // Magic happens here! Instead of returning a Buffer, it uploads to Uguu/Catbox.
      .uploadOptions('uploader') 
      .generate();
      
    // Output is a direct image URL!
    console.log('Image successfully uploaded to:', uploadedImageUrl);
    // e.g., https://n.uguu.se/xxxxxx.png
    
  } catch (error) {
    console.error('Failed to generate or upload card:', error);
  }
}

buildLevelUp();

πŸ“š API Reference

πŸ› οΈ Shared Core Methods

These methods are available on both profiles and levelup classes.

| Method | Argument Type | Description | |--------|--------------|-------------| | .addBackground(src) | String | URL or absolute local file path to the background image. The image will automatically scale to cover the 800x250 canvas with an aesthetic dark overlay. | | .addAvatar(src) | String | URL or absolute local file path to the user's avatar. It will be cropped into a circle. | | .addProgressBar(pct)| Number | Draws a sleek progress bar. pct should be a number between 0 and 100 representing the percentage. | | .uploadOptions(type)| String | Determines the output type of .generate(). Pass 'local' to return a raw Buffer. Pass 'uploader' to automatically POST the image to Uguu.se/Catbox.moe and return the URL String. Default is 'local'. | | .generate() | none | Asynchronously builds the canvas and returns either a Buffer or a String (based on uploadOptions). |

πŸͺͺ profiles Specific Methods

| Method | Argument Type | Description | |--------|--------------|-------------| | .addLevel(number) | Number/String| Sets the primary title on the card (Automatically prepends "Level "). | | .addCurrentExp(text)| String | Sets the secondary text below the progress bar (e.g. "EXP : 500/1000"). |

πŸŽ‰ levelup Specific Methods

| Method | Argument Type | Description | |--------|--------------|-------------| | .addLevelUpText(text)| String | Sets the primary title on the card. Allows custom congratulatory text. | | .addProgress(text) | String | Sets the secondary text below the progress bar. | | .addLevelTransition(before, now) | Number/String | Draws a sleek "Level Before βž” Level Now" transition (e.g. 1 βž” 2) instead of a progress bar. |