From 962cc6f81c9959e05ded1bae8942dc3142b28ca4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 8 Jan 2022 15:21:55 -0500 Subject: [PATCH] prep PR --- CHANGELOG.md | 3 +++ src/app/events/chat/HandlePOAPGM.ts | 1 - src/app/service/poap/OptInPOAP.ts | 2 +- src/app/utils/POAPUtils.ts | 6 ++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e3808c..adb3a1f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ 1. Address sentry.io issues 2022-01-08 - add type guards to messageCreate sentry method + - handle failed to send poap message edge case + - upgrade discord.js -> 13.5.1 + - upgrade slash-create -> 5.0.2 ## 2.5.1-RELEASE (2022-01-07) diff --git a/src/app/events/chat/HandlePOAPGM.ts b/src/app/events/chat/HandlePOAPGM.ts index d1d52132..cdfdc0b9 100644 --- a/src/app/events/chat/HandlePOAPGM.ts +++ b/src/app/events/chat/HandlePOAPGM.ts @@ -18,7 +18,6 @@ const HandlePOAPGM = async (message: Message): Promise => { if (!content.match(/gm/gi)) { return; } - Log.debug(`found gm from ${message.author.tag}`); const dmChannel: DMChannel = message.channel as DMChannel; diff --git a/src/app/service/poap/OptInPOAP.ts b/src/app/service/poap/OptInPOAP.ts index 75b702f1..1426db3f 100644 --- a/src/app/service/poap/OptInPOAP.ts +++ b/src/app/service/poap/OptInPOAP.ts @@ -64,7 +64,7 @@ const OptInPOAP = async (user: User, dmChannel: DMChannel): Promise => { await message.awaitMessageComponent({ filter: args => (args.customId == buttonIds.POAP_OPT_IN_YES || args.customId == buttonIds.POAP_OPT_IN_NO) && args.user.id == user.id.toString(), - time: 10000, + time: 300_000, }).then((interaction) => { if (interaction.customId == buttonIds.POAP_OPT_IN_YES) { isAllowedToGetDMs = true; diff --git a/src/app/utils/POAPUtils.ts b/src/app/utils/POAPUtils.ts index 2cd2dbdf..717b0532 100644 --- a/src/app/utils/POAPUtils.ts +++ b/src/app/utils/POAPUtils.ts @@ -308,6 +308,12 @@ const POAPUtils = { }); if (!message) { Log.warn('failed to send message'); + failedPOAPsList.push({ + discordUserId: participant.discordUserId, + discordUserTag: participant.discordUserTag, + poapLink: poapLink, + }); + results.failedToSend++; i++; continue; }