Natives Rework (Thank you Essem)
Co-authored-by: Essem <TheEssem@users.noreply.github.com>
This commit is contained in:
parent
b424b2f813
commit
ff7f0a3110
88 changed files with 3358 additions and 3104 deletions
|
@ -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.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue