Skip to content

Commit 36ee7f4

Browse files
author
xyzjesper
committed
Added missing return and fixed reply error for errorHelper.ts
1 parent 42aaf84 commit 36ee7f4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/helper/errorHelper.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ export async function errorHandler(interaction: ButtonInteraction | ModalSubmitI
2626
botType: Config.BotType.toString() || "Unknown",
2727
action: LoggingAction.Interaction,
2828
});
29-
await interaction.followUp({
29+
30+
if (!interaction.deferred) {
31+
await interaction.deferReply({
32+
flags: MessageFlags.Ephemeral
33+
})
34+
}
35+
36+
await interaction.editReply({
3037
components: [
3138
new ContainerBuilder()
3239
.addSectionComponents(
@@ -90,7 +97,7 @@ export async function errorHandler(interaction: ButtonInteraction | ModalSubmitI
9097

9198

9299
],
93-
flags: MessageFlags.IsComponentsV2 | MessageFlags.Ephemeral,
100+
flags: MessageFlags.IsComponentsV2,
94101
})
95102

96103
const collector = interaction.channel?.createMessageComponentCollector({

src/helper/ticketHelper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ export async function ticketLookAction(channel: TextChannel | PrivateThreadChann
11591159
content: `## ${await convertToEmojiPng("lockopen", client.user.id)} You unlocked the Ticket successfully!`,
11601160
flags: MessageFlags.Ephemeral,
11611161
})
1162+
return
11621163
}
11631164

11641165
await database.tickets.update({

0 commit comments

Comments
 (0)