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

Rewrite taxon menu as component-based menu #210

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

Rewrite taxon menu as component-based menu #210

wants to merge 14 commits into from

Conversation

synrg
Copy link
Collaborator

@synrg synrg commented Feb 9, 2025

This PR modernizes the taxon menu, bringing it up to the same standards and look-and-feel as our model ,life and ,taxon list commands. All menu, source, and formatter concerns are split off and moved down to dronefly-discord and dronefly-core as needed. When complete, it will finally resolve #141 .

Concepts

  • Social buttons are buttons that any registered user can use to update the menu. For example, the 👤 button is a social button to add or remove the user's own stats for the current display.

Tasks

  • Convert reaction menu to component-based menu.
  • Eliminate round-trip to read/write the message each time a user presses a social button.
  • Use taxon count list source to handle user and place stats tables.
  • Use taxon count formatters for user and place entries.
  • Replace predicate-based user and place query with modal dialogs to handle adding arbitrary user or place (i.e. user 👥 and place 🌍 social buttons) privately.
  • Make interactions cache persist across cog reloads.
  • Remove buttons and expire associated interaction cache when the menu messages are no longer in the Discord cache (avoids exceeding DIscord's rate limit on editing old uncached messages).

synrg added 14 commits January 27, 2024 07:43
- Dronefly frequently exceeds Discord's rate limit for edits to uncached
  messages due to members reacting to uncached messages.
- As time passes and a conversation moves on, the value of further
  reactions on older messages diminish, as many people are no longer
  paying attention to those messages.
- Therefore, this change disables reactions on uncached messages.
- This will cause an inconvenience when the bot has been newly restarted,
  as any interactions started before the reload will no longer respond to
  reactions after the reload.
- This could be remedied in subsequent commits by saving/reloading any
  unexpired interactions when the cog unloads/loads.
- Taxonomy button can be pressed by known users
- Cancel button can be pressed by owner only
- No place/user support yet
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.

taxon/tab embeds: support fast & accurate updates
1 participant