neplextech / canvacord

Easily generate images using react-like components in nodejs. Canvacord is suitable for creating dynamic images such as social media posts, greetings cards, memes, etc. It is also possible to create your own templates and builders to generate images. You are only limited by your imagination.
https://canvacord.neplex.dev
GNU General Public License v3.0
257 stars 74 forks source link

TypeError: new Canvacord.Rank() is not a constructor #139

Closed Kimzzxf closed 2 years ago

Kimzzxf commented 2 years ago

Also i've tried npm i discord-canvas but an error in my terminal

twlite commented 2 years ago

discord-canvas is no longer needed on the latest version. Also, this error might be due to improper import done by you.

The import should roughly look like this:

const Canvacord = require("canvacord");

const card = new Canvacord.Rank();

// or just
const { Rank } = require("canvacord");

const card = new Rank();