debug: catch & trace interaction reply errors

This commit is contained in:
Dragory 2022-06-01 18:58:54 +03:00
parent 016330366e
commit 6df67da3cb
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 27 additions and 15 deletions

View file

@ -192,7 +192,9 @@ export async function displaySearch(
collector.on("collect", async (interaction: MessageComponentInteraction) => {
if (msg.author.id !== interaction.user.id) {
interaction.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true });
interaction
.reply({ content: `You are not permitted to use these buttons.`, ephemeral: true })
.catch((err) => console.trace(err.message));
} else {
if (interaction.customId === `previousButton:${idMod}` && currentPage > 1) {
collector.stop();