Skip to content

Commit 2076b2d

Browse files
BigMichi1Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent b3e194c commit 2076b2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/bot/bot.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,12 @@ client.on(Events.MessageCreate, async (message) => {
231231
const label = `New code${unredeemedCodes.length > 1 ? 's' : ''} detected: ${codeList}`;
232232
const u = await client.users.fetch(id);
233233
await u.send(`🔔 ${label}`);
234+
} catch { /* DM delivery failure is non-critical */ }
235+
finally {
234236
if (i < recipientIds.length - 1) {
235237
await new Promise<void>((resolve) => setTimeout(resolve, 500));
236238
}
237-
} catch { /* DM delivery failure is non-critical */ }
239+
}
238240
}
239241
} catch (err) {
240242
logger.error('Unexpected error in code-detection DM fan-out:', err);

0 commit comments

Comments
 (0)