Skip to content

Commit dfd3b18

Browse files
committed
chore(supportthreads): add logging for waiting for initial thread message
1 parent 0a0e4d4 commit dfd3b18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ client.on(GatewayDispatchEvents.ThreadCreate, async ({ data: channel }) => {
130130

131131
// Messages can only be sent after the thread starter message has arrived.
132132
// This can take substantial amounts of time after thread create in the case of large attachments
133-
const collected = await waitForMessage(channel.id, 10_000).catch(() => null);
133+
const collected = await waitForMessage(channel.id, 10_000).catch((error: Error) => {
134+
logger.info(error, `Failed while waiting for a message in channel ${channel.id}: ${error.message}`);
135+
});
136+
134137
if (!collected) {
135138
return;
136139
}

0 commit comments

Comments
 (0)