Repository navigation
refactor: switch reactions with buttons - #59
Merged
Merged
Conversation
RedStar071
force-pushed
the
refactor/switch-reactions-confirm-to-button
branch
from
October 21, 2024 13:57
d08f307 to
e1a65af
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
==========================================
+ Coverage 71.94% 71.98% +0.03%
==========================================
Files 91 91
Lines 2841 2834 -7
Branches 209 292 +83
==========================================
- Hits 2044 2040 -4
+ Misses 792 789 -3
Partials 5 5 ☔ View full report in Codecov by Sentry. |
RedStar071
force-pushed
the
refactor/switch-reactions-confirm-to-button
branch
from
October 27, 2024 15:20
e1a65af to
f9bb2fe
Compare
Signed-off-by: Davide Trinastich <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes significant changes to the
src/lib/util/functions/messages.tsfile to replace reaction-based confirmation prompts with button-based ones. The most important changes include the removal of reaction handling code, the addition of button handling code, and the update of thepromptConfirmationfunction to use buttons exclusively.Transition from Reactions to Buttons:
src/lib/util/functions/messages.ts: Removed thecanReactandcanRemoveAllReactionsimports as they are no longer needed for button-based interactions.src/lib/util/functions/messages.ts: Added imports forActionRowBuilder,ButtonBuilder,ButtonStyle, andComponentTypefromdiscord.jsto facilitate button-based interactions.Refactor of Confirmation Prompt Functions:
src/lib/util/functions/messages.ts: Replaced thePromptConfirmationReactionsenum and thepromptConfirmationReactionfunction with a newpromptConfirmationButtonfunction that creates and handles button interactions.src/lib/util/functions/messages.ts: Updated thepromptConfirmationfunction to use the newpromptConfirmationButtonfunction instead of the old reaction-based methods.…reactions