mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-06 18:21:25 +03:00
fix: send image in embed (closes #441)
This commit is contained in:
@@ -420,8 +420,6 @@ module.exports = class TicketManager {
|
|||||||
topic: `${creator}${topic?.length > 0 ? ` | ${topic}` : ''}`,
|
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 needsStats = /{+\s?(avgResponseTime|avgResolutionTime)\s?}+/i.test(category.openingMessage);
|
||||||
const statsCacheKey = `cache/category-stats/${categoryId}`;
|
const statsCacheKey = `cache/category-stats/${categoryId}`;
|
||||||
let stats = await this.client.keyv.get(statsCacheKey);
|
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) {
|
if (answers) {
|
||||||
embeds.push(
|
embeds.push(
|
||||||
new ExtendedEmbedBuilder()
|
new ExtendedEmbedBuilder()
|
||||||
|
Reference in New Issue
Block a user