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

Improve "Show votes" output #42

Open
JohnnyJayJay opened this issue Jun 1, 2023 · 2 comments
Open

Improve "Show votes" output #42

JohnnyJayJay opened this issue Jun 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@JohnnyJayJay
Copy link
Owner

Currently, the show votes output is rather limited due to Discord's message limits.

To support arbitrary participant counts when showing votes, the current system should be refined in the following way:

  1. Construct the message text respecting message limits, splitting into multiple messages if necessary.
  2. If there are 6 or less resulting messages, send the response and up to 5 followup messages.
  3. If there are more than 6 resulting messages, format the results as a table and use a text file attachment.
@JohnnyJayJay JohnnyJayJay added the enhancement New feature or request label Jun 1, 2023
@JohnnyJayJay
Copy link
Owner Author

The message can first be constructed like normal and then split on new lines when the limit is reached.

@JohnnyJayJay
Copy link
Owner Author

As it turns out, this is a bit difficult to accomplish because there's no confirmation when the interaction response comes through. Thus, there is a race condition between the initial response being accepted and the followup messages being sent. I would like to avoid implementing an artificial delay and "hoping for the best", so maybe another possibility could be a single message with some sort of pagination?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant