-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/cap 236 guild #96
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9a5f66d
added implementation to connect User id with Guild and Guild id with …
woweiseng ffb49e1
fixed issues with profile delete
woweiseng 0f22599
Ensure a user has events & guilds before deleting them from said even…
TagCiccone 9dea177
Whoops, make sure guild deletion checks for guild attr
TagCiccone 589b667
Merge branch 'develop' of https://github.com/CApy-RPI/app into featur…
woweiseng 71a3b50
merge changes
woweiseng c5d27ee
auto fix
woweiseng 27faf0c
[Feature] - updated pre-commit config
shamikkarkhanis 7ea8386
[Feature] - updated pre commit once again
shamikkarkhanis 47757e8
update yaml again
shamikkarkhanis 23c01e4
pre-commit no fix
shamikkarkhanis bc05fd3
ruff fixes
shamikkarkhanis c0d7b48
ruff fixes again
shamikkarkhanis cecfc32
removed ruff args
shamikkarkhanis c19fbc0
more ruff fixes
shamikkarkhanis 3993ee5
Remove Python 3.13 from CI workflow
shamikkarkhanis 56a3c83
fixing try again not working issue
woweiseng b355338
Merge branch 'feature/cap-236-guild' of https://github.com/CApy-RPI/a…
woweiseng 0a468e5
auto fix
woweiseng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ def __init__(self, ephemeral: bool = True, **options) -> None: | |
| self._completed: bool = False | ||
| self._timed_out: bool = False | ||
| self.value: bool | None = None | ||
| self.interaction: Interaction | None = None | ||
|
|
||
| async def _send_status_message(self, content: str) -> None: | ||
| """Update status message.""" | ||
|
|
@@ -77,19 +78,20 @@ class AcceptCancelView(BaseButtonView): | |
| @discord.ui.button(label="Accept", style=ButtonStyle.success) | ||
| async def accept(self, interaction: Interaction, _button: discord.ui.Button[Any]) -> None: | ||
| """Handle accept button press.""" | ||
| await interaction.response.defer() | ||
| # Store the interaction so the caller can respond to it | ||
| self.interaction = interaction | ||
| self.value = True | ||
| self._completed = True | ||
| await self._send_status_message("Operation accepted") | ||
| self.stop() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: Duplicate call to self.stop() in cancel handler. Please remove the redundant 'self.stop()' call to simplify the method. |
||
|
|
||
| @discord.ui.button(label="Cancel", style=ButtonStyle.danger) | ||
| async def cancel(self, interaction: Interaction, _button: discord.ui.Button[Any]) -> None: | ||
| """Handle cancel button press.""" | ||
| await interaction.response.defer() | ||
| # Store the interaction so the caller can respond to it | ||
| self.interaction = interaction | ||
| self.value = False | ||
| self._completed = True | ||
| await self._send_status_message("Operation cancelled") | ||
| self.stop() | ||
| self.stop() | ||
|
|
||
|
|
||
|
|
||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider making the timeout value configurable.
Hardcoding the timeout to 60 seconds reduces flexibility. Making it configurable would better support different use cases.
Suggested implementation:
If
show_profile_embedis called from other places, you may want to pass thedelete_profile_timeoutargument from those call sites, or rely on the default value.You may also want to document the new parameter in the function's docstring.