canvacord
Advanced tools
Comparing version 5.4.1 to 5.4.2
@@ -27,4 +27,5 @@ // Created and maintained by DevAndromeda | ||
Spotify: require("./src/Spotify"), | ||
Welcomer: load("./src/Welcomer"), | ||
Leaver: load("./src/Leaver"), | ||
Welcomer: require("./src/Welcomer"), | ||
Leaver: require("./src/Leaver"), | ||
Greeting: require("./src/base/GreetingsCard"), | ||
CaptchaGen: load("captcha-canvas") ? load("captcha-canvas").CaptchaGenerator : null, | ||
@@ -31,0 +32,0 @@ FortniteShop: load("discord-canvas") ? load("discord-canvas").FortniteShop : null, |
{ | ||
"name": "canvacord", | ||
"version": "5.4.1", | ||
"version": "5.4.2", | ||
"description": "Powerful image manipulation package for beginners.", | ||
@@ -58,3 +58,3 @@ "main": "index.js", | ||
"chalk": "^5.0.1", | ||
"moment": "^2.29.1", | ||
"moment": "^2.29.4", | ||
"moment-duration-format": "^2.3.2", | ||
@@ -61,0 +61,0 @@ "node-fetch": "2.6.7" |
const fs = require("fs"); | ||
const path = require("path"); | ||
const ASSETS_DIR = "CANVACORD_ASSETS" in process.env ? process.env.CANVACORD_ASSETS : `${__dirname}/../assets`; | ||
const ASSETS_DIR = "CANVACORD_ASSETS" in process.env ? process.env.CANVACORD_ASSETS : path.join(__dirname, "..", "assets"); | ||
@@ -20,3 +21,3 @@ let loaded = false; | ||
name, | ||
path: `${ASSETS_DIR}/${asset}/${d}`, | ||
path: path.join(ASSETS_DIR, asset, d), | ||
type: asset === "fonts" ? "FONT" : "IMAGE" | ||
@@ -23,0 +24,0 @@ }; |
@@ -378,8 +378,7 @@ const Trigger = require("../libs/Trigger"); | ||
// Canvas.GlobalFonts.loadFontsFromDir(`${Canvacord.assets.ASSETS_DIR}/fonts`) | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("MANROPE_BOLD"), "MANROPE_BOLD"); | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("MANROPE_REGULAR"), "MANROPE_REGULAR"); | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("WHITNEY_MEDIUM"), "WHITNEY_MEDIUM"); | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("WHITNEY_BOOK"), "WHITNEY_BOOK"); | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("ROBOTO_LIGHT"), "ROBOTO_LIGHT"); | ||
Canvas.GlobalFonts.registerFromPath(Canvacord.assets.font.get("ROBOTO_REGULAR"), "ROBOTO_REGULAR"); | ||
const fonts = Canvacord.assets.font.all(); | ||
for (const font in fonts) { | ||
Canvas.GlobalFonts.registerFromPath(fonts[font].path, fonts[font].name); | ||
} | ||
} else { | ||
@@ -386,0 +385,0 @@ fontArray.forEach(font => { |
@@ -1,2 +0,2 @@ | ||
const { Base } = require("discord-canvas"); | ||
const Base = require("./base/GreetingsCard"); | ||
const Util = require("./Util"); | ||
@@ -91,3 +91,3 @@ | ||
async build() { | ||
return (await this.toAttachment()).toBuffer(); | ||
return (await this.toAttachment()).encode("png"); | ||
} | ||
@@ -94,0 +94,0 @@ |
@@ -1,2 +0,2 @@ | ||
const { Base } = require("discord-canvas"); | ||
const Base = require("./base/GreetingsCard"); | ||
const Util = require("./Util"); | ||
@@ -90,3 +90,3 @@ | ||
async build() { | ||
return (await this.toAttachment()).toBuffer(); | ||
return (await this.toAttachment()).encode("png"); | ||
} | ||
@@ -93,0 +93,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201464
32
4085
Updatedmoment@^2.29.4