Exception while command handling leads to crash #40

Closed
opened 2025-07-21 11:37:23 +09:00 by AnthonyKwon · 0 comments
Owner

Expected Behavior

Bot should log error and continue running on Discord API error while running interaction.

Actual Behavior

Bot crashes when Discord API Error thrown while running interaction.

Possible Solution

When Error thrown while running interaction, app catches it and tries to log it. While logging, app tries to show message to Discord by interaction reply. However, when Discord API Error is thrown, interaction can't be used anymore. So, application will crash when tries to use interaction.
We should not use interaction here, or we need to detect if Error is Discord API Error for at least.

## Expected Behavior Bot should log error and continue running on Discord API error while running interaction. ## Actual Behavior Bot crashes when Discord API Error thrown while running interaction. ## Possible Solution When Error thrown while running interaction, app catches it and tries to log it. While logging, app tries to show message to Discord by interaction reply. However, when Discord API Error is thrown, interaction can't be used anymore. So, application will crash when tries to use interaction. We should not use interaction here, or we need to detect if Error is Discord API Error for at least.
AnthonyKwon added this to the 4.0.0 milestone 2025-07-21 11:37:23 +09:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AnthonyKwon/chattybot#40
No description provided.