Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Canvas } = require('canvas-constructor');
- const fsn = require('fs-nextra');
- module.exports.run = async (client, message, args) => {
- async function createCanvas() {
- const image = await fsn.readFile('./original/.png');
- return new Canvas(300, 400)
- .addImage(image, 0, 0, 300, 400)
- .setColor('#FFAE23')
- .setTextFont('28px Impact')
- .setTextAlign('center')
- .addText('Kitten!', 150, 370)
- .toBufferAsync();
- message.channel.send({ file: { attachment: await createCanvas(), name: 'original.png' } })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement