Skip to content

Commit 71611bb

Browse files
committed
fix(help): ignore expired webhook token error when clearing components on collector end
1 parent 50fc8d6 commit 71611bb

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/commands/public/misc/help.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,16 @@ module.exports = {
101101

102102
collector.on("end", async () => {
103103
client.activeEphemeralMessages.delete(userId);
104-
await interaction.editReply({
105-
embeds: [embeds[currentGroup][currentPage[currentGroup]]],
106-
components: [],
107-
});
104+
try {
105+
await interaction.editReply({
106+
embeds: [embeds[currentGroup][currentPage[currentGroup]]],
107+
components: [],
108+
});
109+
} catch (error) {
110+
if (error.code !== 50027) {
111+
logger.error("Error clearing help components on collector end:", error);
112+
}
113+
}
108114
});
109115
} catch (error) {
110116
logger.error("Error processing help command:", error);

0 commit comments

Comments
 (0)