Natives Rework (Thank you Essem)

Co-authored-by: Essem <TheEssem@users.noreply.github.com>
This commit is contained in:
murm 2023-03-19 04:40:32 -04:00
parent b424b2f813
commit ff7f0a3110
88 changed files with 3358 additions and 3104 deletions

View file

@ -79,14 +79,17 @@ class ImageCommand extends Command {
}
try {
const { buffer, type } = await runImageJob(imageParams);
const { buffer, type, width, height } = await runImageJob(imageParams);
if (type === "nogif" && this.constructor.requiresGIF) {
return "That isn't a GIF!";
}
this.success = true;
return {
contents: buffer,
name: `${this.constructor.command}.${type}`
name: `${this.constructor.command}.${type}`,
type,
width,
height
};
} catch (e) {
if (e === "Request ended prematurely due to a closed connection") return "This image job couldn't be completed because the server it was running on went down. Try running your command again.";