Skip to content

feat(commands): add user context to remove_staff command#166

Merged
Akinator31 merged 1 commit intomainfrom
158-extend-remove_staff-command-to-work-with-user-context-menus
Oct 7, 2025
Merged

feat(commands): add user context to remove_staff command#166
Akinator31 merged 1 commit intomainfrom
158-extend-remove_staff-command-to-work-with-user-context-menus

Conversation

@Akinator31
Copy link
Copy Markdown
Member

This pull request updates the remove_staff command to support both slash and user context menu invocations, improving its flexibility and error handling. The most important changes are:

Command registration and invocation

  • Added support for registering remove_staff as a user context menu command by including a new CreateCommand with CommandType::User in the command registration.
  • Updated imports to include CommandType for the new command registration.

Argument handling and error reporting

  • Enhanced argument resolution logic to handle user context menu invocations by extracting the target user ID from command.data.target_id if arguments are missing, and improved error reporting for invalid or missing arguments.

@Akinator31 Akinator31 self-assigned this Oct 7, 2025
@Akinator31 Akinator31 linked an issue Oct 7, 2025 that may be closed by this pull request
@Akinator31 Akinator31 merged commit 05a19ae into main Oct 7, 2025
6 checks passed
@Akinator31 Akinator31 deleted the 158-extend-remove_staff-command-to-work-with-user-context-menus branch October 7, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend remove_staff command to work with user context menus

1 participant