-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
While reviewing PR #41, a potential concurrency race condition was identified in the ConfigCommand.java file. When multiple users interact with the same menu (confirming or canceling a configuration change), the config could be updated or overwritten unpredictably.
Feature Request
Add an option for menus to be only usable by the person who triggered them. This would solve two problems:
- Prevent unauthorized users from interacting with menus not intended for them
- Prevent race conditions when multiple users interact with the same menu simultaneously
Context
- Found in PR: Move to using JSON config for guilds. #41
- Discussion: Move to using JSON config for guilds. #41 (comment)
Implementation Suggestions
- Add a 'restrictToOriginalUser' boolean option to menu creation methods
- When enabled, check if the interacting user matches the user who triggered the original command
- Reject interactions from other users with an appropriate message
Related Components
- ConfigCommand.java
- MenuManager implementation
- SelectMenu class
Metadata
Metadata
Assignees
Labels
No labels