Canvas
const canvas = new Discord.Canvas(200, 200); // width, height
const ctx = canvas.getContext('2d');ctx.rect(10, 10, 30, 30); // x, y, width, height
ctx.ellipse(30, 40, 20, 20); // x, y, width, height
ctx.text('hello world', 20, 100, 20, 'arial'); // text, x, y, size?, font?ctx.background('#121212'); // color (hex, rgb)
ctx.fill('rgb(255, 0, 130)'); // color (hex, rgb)ctx.beginMask('example'); // mask id
ctx.rect(20, 20, 50, 50);
ctx.closeMask();ctx.mask('example'); // mask id
ctx.fill('#4912fe');
ctx.rect(10, 10, 70, 70);Last updated