Added image timeout message

This commit is contained in:
Essem 2021-08-05 20:41:30 -05:00
parent c0974e2d49
commit a1e4920c4d
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 2 additions and 0 deletions

View File

@ -107,6 +107,7 @@ class ImageCommand extends Command {
name: `${this.constructor.command}.${type}`
};
} catch (e) {
if (e === "Job timed out") return "The image is taking too long to process (>=15 minutes), so the job was cancelled. Try using a smaller image.";
if (e.toString().includes("Not connected to image server") || e === "No available servers") return "I can't seem to contact the image servers, they might be down or still trying to start up. Please wait a little bit.";
throw e;
} finally {

View File

@ -2,6 +2,7 @@ const Command = require("../../classes/command.js");
class ImageStatsCommand extends Command {
async run() {
await this.message.channel.sendTyping();
const servers = await this.ipc.command("image", { type: "stats" }, true);
const embed = {
embed: {