mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 00:12:38 +02:00
Fix
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class DominantColorCommand extends Command {
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
const name = ntc.name(hexColor);
|
||||
return msg.say(`${hexColor.toUpperCase()} - ${name[1]}`, {
|
||||
files: [{ attachment: canvas.toBuffer(), name: 'dominant-color.png' }]
|
||||
files: [{ attachment: canvas.toBuffer('image/png'), name: 'dominant-color.png' }]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,6 +40,6 @@ module.exports = class FacesCommand extends Command {
|
||||
ctx.fillRect(face.box.xMin, face.box.yMax, face.box.width + lineSize, lineSize);
|
||||
ctx.fillRect(face.box.xMax, face.box.yMin, lineSize, face.box.height);
|
||||
}
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'faces.png' }] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'faces.png' }] });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user