Load fonts directly from assets directory, fix image buffer issues

This commit is contained in:
Essem 2022-09-22 23:44:54 -05:00
parent 273e5b94d7
commit 4f66519aa7
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
22 changed files with 188 additions and 111 deletions

View file

@ -77,13 +77,13 @@ class ImageCommand extends Command {
}
try {
const { arrayBuffer, type } = await runImageJob(imageParams);
const { buffer, type } = await runImageJob(imageParams);
if (type === "nogif" && this.constructor.requiresGIF) {
return "That isn't a GIF!";
}
this.success = true;
return {
file: Buffer.from(arrayBuffer),
file: buffer,
name: `${this.constructor.command}.${type}`
};
} catch (e) {