diff --git a/events/messageCreate.js b/events/messageCreate.js index fa39942..12d71bd 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -105,9 +105,9 @@ module.exports = async (client, cluster, ipc, message) => { embed: { color: 16711680, title: "Here's your image!", - url: `${process.env.TMP_DOMAIN == "" ? "https://projectlounge.pw/tmp" : process.env.TMP_DOMAIN}/${filename}`, + url: `${process.env.TMP_DOMAIN == "" ? "https://tmp.projectlounge.pw" : process.env.TMP_DOMAIN}/${filename}`, image: { - url: `${process.env.TMP_DOMAIN == "" ? "https://projectlounge.pw/tmp" : process.env.TMP_DOMAIN}/${filename}` + url: `${process.env.TMP_DOMAIN == "" ? "https://tmp.projectlounge.pw" : process.env.TMP_DOMAIN}/${filename}` }, footer: { text: "The result image was more than 8MB in size, so it was uploaded to an external site instead." diff --git a/utils/image.js b/utils/image.js index 0b3a78e..6e7d8f4 100644 --- a/utils/image.js +++ b/utils/image.js @@ -98,7 +98,10 @@ exports.connect = async (server) => { }); connection.once("close", () => { for (const uuid of Object.keys(this.jobs)) { - if (this.jobs[uuid].addr === server) this.jobs[uuid].event.emit("error", "Job ended prematurely due to a closed connection; please run your image job again"); + if (this.jobs[uuid].addr === server) { + this.jobs[uuid].event.emit("error", "Job ended prematurely due to a closed connection; please run your image job again"); + delete this.jobs[uuid]; + } } //logger.log(`Lost connection to ${server}, attempting to reconnect...`); this.connections.delete(server);