Skip to content

Fix 'already replied' issue in SelectMenu.handle method #46

Description

@coderabbitai

Description

Currently, the SelectMenu.handle method in src/main/java/botcommons/menu/types/SelectMenu.java has a temporary fix for an issue with Discord interaction responses:

// TODO: fix already replied issue
event.deferReply().queue();

This is a workaround to prevent timeout errors when handling button interactions, but it's not a comprehensive solution.

Proposed Solution

Implement a proper interaction response handling mechanism that can track the state of each interaction to prevent 'already replied' errors. For example:

if (!event.isAcknowledged()) {
    event.deferReply().queue();
}

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions