1.2.2 • Published 6 days ago

kdprod v1.2.2

Weekly downloads
-
License
ISC
Repository
github
Last release
6 days ago

KDPROD

NPM Version NPM Downloads NPM License

Overview

kdprod is a powerful and easy-to-use Node.js library that provides functionalities for creating dynamic Discord profile images. It allows you to generate stunning welcome and rank cards for your Discord bot users with minimal effort.

Installation

Install kdprod using npm:

npm i kdprod

Examples

const { Client } = require("discord.js");
const { DiscordProfile } = require('kdprod');
const canvas = new DiscordProfile();

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

client.on('messageCreate', async (message) => {
    if (message.author.bot) return;
 
    let imageURL = 'https://i.imgur.com/ea9PB3H.png';
    const image = await canvas.welcome(message.author, { link: imageURL, blur: false });

    message.channel.send({ files: [image] });
});


client.login('Your-Bot-Token');

Image

const { Client } = require("discord.js");
const { DiscordProfile } = require('kdprod');
const canvas = new DiscordProfile();

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

client.on('messageCreate', async (message) => {
    if (message.author.bot) return;
 
    try {

        let imageURL = 'https://i.imgur.com/ea9PB3H.png';
        const image = await canvas.rankcard({
            member: message.author,
            currentXP: 50,
            fullXP: 100,
            level: 1,
            rank: 5,
            link: imageURL
        });

        message.channel.send({ files: [image] });
    } catch (e) {
        console.log(e);
    }
});


client.login('Your-Bot-Token');

Image

Licence

This project is licensed under the MIT License. Feel free to contribute and use it in your projects!

1.2.2

6 days ago

1.2.0

18 days ago

1.2.1

16 days ago

1.1.3

4 months ago

1.1.2

4 months ago

1.1.0

4 months ago

1.0.2

4 months ago

1.0.0

4 months ago