fix: send image in embed (closes #441)

This commit is contained in:
Isaac 2023-06-25 14:31:36 +01:00
parent 3b5e58c1fe
commit 48902f8131
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -420,8 +420,6 @@ module.exports = class TicketManager {
topic: `${creator}${topic?.length > 0 ? ` | ${topic}` : ''}`,
});
if (category.image) await channel.send(category.image);
const needsStats = /{+\s?(avgResponseTime|avgResolutionTime)\s?}+/i.test(category.openingMessage);
const statsCacheKey = `cache/category-stats/${categoryId}`;
let stats = await this.client.keyv.get(statsCacheKey);
@ -460,6 +458,8 @@ module.exports = class TicketManager {
),
];
if (category.image) embeds[0].setImage(category.image);
if (answers) {
embeds.push(
new ExtendedEmbedBuilder()