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

Feature request: set the player names when creating a draft via API #128

Open
ZetaTwo opened this issue Dec 5, 2024 · 3 comments · May be fixed by #131
Open

Feature request: set the player names when creating a draft via API #128

ZetaTwo opened this issue Dec 5, 2024 · 3 comments · May be fixed by #131

Comments

@ZetaTwo
Copy link

ZetaTwo commented Dec 5, 2024

I'm working on some ideas around tournament management and it would be nice to be able to set the player names when creating a draft via the API. For example, the request could look like:

{
  "participants": {
    "host": "Player name 1",
    "guest": "Player name 2"
  },
  "preset": {
    "id": "Hidden_1v1",
    "name": "Hidden 1v1"
  }
}
@ZetaTwo
Copy link
Author

ZetaTwo commented Dec 5, 2024

I should also add that I would be willing to implement this if this feature is deemed something you want.

@HSZemi
Copy link
Member

HSZemi commented Dec 7, 2024

I am not generally opposed to the idea. You should keep in mind though that Players
a) usually have a custom name pre-set and
b) generally are able to change their name mid-draft.

If this is implemented, it should not overwrite a locally selected name.
It could be implemented by adding a fixedNames flag to the Draft object, which is set to true if a draft is created with fixed names. The draft server could then ignore set_name messages for drafts that have the flag set.

@ZetaTwo
Copy link
Author

ZetaTwo commented Dec 7, 2024

That sounds like a great solution.

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 a pull request may close this issue.

2 participants