Skip to content

Commit 2ffb58d

Browse files
authored
Merge pull request #130 from konnatoad/dev
Ignore expired webhook token error during component clearing
2 parents 50fc8d6 + 71611bb commit 2ffb58d

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)