Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvacord

Package Overview
Dependencies
Maintainers
4
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvacord - npm Package Compare versions

Comparing version 4.0.2 to 5.0.0

.jsdoc.json

5

index.js

@@ -1,1 +0,4 @@

module.exports = require("./src/Canvas");
const Canvacord = require("./src/Canvacord");
module.exports = Canvacord;
module.exports.plugins = require("./src/Plugins");
{
"name": "canvacord",
"version": "4.0.2",
"description": "Simple & easy to use image manipulation module for discord bots with a lot of features like rank card, memes & more.",
"version": "5.0.0",
"description": "Powerful image manipulation package for beginners.",
"main": "index.js",
"scripts": {
"docsgen": "jsdoc --configure .jsdoc.json --verbose",
"test": "cd test && node index.js",
"format": "prettier --write \"src/**/*.js\""
"test": "cd test && node ."
},
"homepage": "https://canvacord.js.org",
"repository": {

@@ -17,21 +15,12 @@ "type": "git",

"keywords": [
"Canvacord",
"discord-canvas",
"discord.js-canvas",
"discord.js-image",
"memes",
"rank",
"rank-card",
"welcomer",
"leaver",
"dank-memer",
"imagen",
"imgen",
"imagegen",
"canvacord",
"canvas",
"jimp",
"image",
"manipulation",
"easy",
"simple",
"fast",
"api"
],
"author": "Snowflake107",
"license": "GPL-3.0",
"funding": {

@@ -41,9 +30,12 @@ "type": "individual",

},
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/Snowflake107/Canvacord/issues"
},
"homepage": "https://canvacord.js.org",
"dependencies": {
"@jimp/custom": "^0.14.0",
"@jimp/plugin-circle": "^0.14.0",
"canvacord-assets": "^1.0.6",
"canvas": "^2.6.1",
"gifencoder": "^2.0.1",
"jimp": "^0.14.0",
"moment": "^2.27.0",
"moment": "^2.29.0",
"moment-duration-format": "^2.3.2",

@@ -53,9 +45,7 @@ "node-canvas-with-twemoji-and-discord-emoji": "^1.1.4"

"devDependencies": {
"jsdoc": "^3.6.5",
"jsdoc-skyceil": "^1.0.5",
"prettier": "^2.0.5"
},
"bugs": {
"url": "https://github.com/Snowflake107/Canvacord/issues"
"captcha-canvas": "^2.2.1",
"discord-canvas": "github:Snowflake107/discord-canvas",
"jsdoc": "^3.6.6",
"jsdoc-skyceil": "github:zyrouge/jsdoc-skyceil"
}
}

110

README.md
# Canvacord
Canvacord is a wrapper for canvas & jimp which can be used to create/manipulate images easily.
This package is meant for beginners who don't know how to use canvas & stuffs.
Powerful image manipulation tool to manipulate images easily.
> ⚠ This package is not recommended to you if you know how to use canvas/other image manipulation tools.
# Installation
# Installing
```bash
npm i --save canvacord
```sh
npm i canvacord
```
[![NPM](https://nodei.co/npm/canvacord.png)](https://nodei.co/npm/canvacord/)
# Features
- Beginner friendly
- Supports Buffer or image url
- Super fast image manipulation
- Welcomer and leaver images
- Rank card
- and more...
- Super simple and easy to use 😎
- Faster than canvacord v4 🚀
- More than **50 methods**...? Yay! 🎉
- Built on node-canvas and no bullsh*t involved 🔥
- Object oriented 💻
- Beginner friendly 🤓
- Supports emojis 😀
# Limitations
- You can only create stuffs using the mentioned functions.
- You cannot create super-fancy things
- If you want to go deeper, you must learn canvas
# Documentation
**[https://canvacord.js.org](https://canvacord.js.org)**
# Methods
**[All The Methods are listed here](https://canvacord.js.org)**
# Join our Discord server
**[https://discord.gg/2SUybzb](https://discord.gg/2SUybzb)**
# Example
# Examples
## Rank Card
```js
const canvacord = require("canvacord");
const img = "https://cdn.discordapp.com/embed/avatars/0.png";
async function create() {
let img = await canvacord.trigger("./image.png");
canvacord.write(img, "triggered.gif");
const userData = getDataSomehow();
let color = await canvacord.color("#4E5D94");
canvacord.write(color, "color.png");
}
const rank = new canvacord.Rank()
.registerFonts()
.setAvatar(img)
.setCurrentXP(userData.xp)
.setRequiredXP(userData.requiredXP)
.setStatus("dnd")
.setProgressBar("#FFFFFF", "COLOR")
.setUsername("Snowflake")
.setDiscriminator("0007");
create();
rank.build()
.then(data => {
const attachment = new Discord.MessageAttachment(data, "RankCard.png");
message.channel.send(attachment);
});
```
# Discord.js Example
### Preview
![RankCard](https://raw.githubusercontent.com/Snowflake107/canvacord/v5-alpha/test/images/RankCard.png)
## Other Examples
```js

@@ -60,3 +69,3 @@ const Discord = require("discord.js");

if (message.author.bot) return;
if (message.content === "!trigger") {
if (message.content === "!triggered") {
let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });

@@ -67,43 +76,8 @@ let image = await canvacord.trigger(avatar);

}
if (message.content === "!delete") {
let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
let image = await canvacord.delete(avatar);
let attachment = new Discord.MessageAttachment(image, "deleted.png");
return message.channel.send(attachment);
}
if (message.content === "!rank") {
let rank = getRankSomehow();
let image = await canvacord.rank({
username,
discrim,
level: rank.level,
rank: rank.rank,
neededXP: rank.neededXP,
currentXP: rank.currentXP,
avatarURL: message.author.displayAvatarURL({ format: "png" }),
color: "white",
background: "https://link-to/superDuperBackground"
});
let attachment = new Discord.MessageAttachment(image, "rank.png");
return message.channel.send(attachment);
}
});
client.login("Your_Bot_Token_here");
```
# Documentation
**[https://canvacord.snowflakedev.xyz](https://canvacord.js.org)**
# License
This project is licensed under **[GNU GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/gpl-3.0.en.html)**.
```md
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
```
# Join Our Discord Server
**[discord.gg/uqB8kxh](https://discord.gg/uqB8kxh)**
# Note
> ⚠ | In order to use `Canvacord#Welcomer`/`Canvacord#Leaver`/`Canvacord#CaptchaGen`, you may need to install packages like **[discord-canvas](https://npmjs.com/package/discord-canvas)** & **[captcha-canvas](https://npmjs.com/package/captcha-canvas)**.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc