Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Add_user button #577

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

t0xicVybez
Copy link

@t0xicVybez t0xicVybez commented Jan 29, 2025

Allows players to add a user to their ticket via mention with an add Button

Versioning information

  • This includes major changes (breaking changes)
  • This includes minor changes (minimal usage changes, minor new features)
  • This includes patches (bug fixes)
  • This does not change functionality at all (code refactoring, comments)

Is this related to an issue?

Changes made

For documenting changes, here's a complete list:

Files Modified:

  1. src/lib/tickets/manager.js
    • Added add user button to ticket interface alongside claim and close buttons

Files Created:

  1. src/buttons/add_user.js
    • Created new button handler for adding users to tickets
    • Implements username-based user search
    • Uses modal interface for user input

Functionality Added:

  • Users can now add other users to tickets via a button
  • Supports username/display name search
  • Proper permission checking and error handling
  • Success/failure notifications
  • Event logging for user additions

Confirmations

  • I have updated related documentation (if necessary)
  • My changes use consistent code style
  • My changes have been tested and confirmed to work

Allows players to add a user to their ticket via mention with an add Button
@eartharoid
Copy link
Member

This looks decent but

  1. a hyphen (add-user) would be consistent with force-close
  2. I think a user-select menu would be nicer to use than a text input (it suggests users as you type and also guarantees a valid user object)
  3. The claim and close buttons are optional, so this should be too, like feat: add per-category blocked roles-list #495 (you don't need to edit the web app)

Regarding a select menu, a second action row with the menu under the opening message would require the least code and be the quickest for users, but it might be too ugly or distracting? This button returning an ephemeral message with the menu would be ok.

@t0xicVybez1
Copy link

This looks decent but

  1. a hyphen (add-user) would be consistent with force-close
  2. I think a user-select menu would be nicer to use than a text input (it suggests users as you type and also guarantees a valid user object)
  3. The claim and close buttons are optional, so this should be too, like feat: add per-category blocked roles-list #495 (you don't need to edit the web app)

Regarding a select menu, a second action row with the menu under the opening message would require the least code and be the quickest for users, but it might be too ugly or distracting? This button returning an ephemeral message with the menu would be ok.

I did try your select menu origionally and yes it did look ugly and distracting lol.. i will review the pr you referenced and see how i can achieve it to be disabled and enabled. May attempt to pick your brain on that one in the next few days.

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.

3 participants