Skip to content

Conversation

krittick
Copy link
Contributor

@krittick krittick commented Feb 21, 2022

Summary

This adds a send_modal shortcut property to ApplicationContext to allow easier sending of modal dialogs instead of needing to use ctx.interaction.response.send_modal()

Examples were also updated to use the new method where appropriate.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...)

@krittick krittick added priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer feature Implements a feature Merge normally labels Feb 21, 2022
@krittick krittick added this to the v2.0 milestone Feb 21, 2022
@krittick krittick self-assigned this Feb 21, 2022
@Lulalaby
Copy link
Member

Send modal sounds inappropriate
Maybe respond with modal?

@krittick
Copy link
Contributor Author

Send modal sounds inappropriate
Maybe respond with modal?

I just kept it the same as the underlying method so it's easier for users to switch.

Dorukyum
Dorukyum previously approved these changes Feb 21, 2022
@krittick
Copy link
Contributor Author

PR has been updated to make send_modal now return the Interaction object, which mirrors the behavior of send_message for consistency.

@krittick krittick merged commit 9f065aa into Pycord-Development:master Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants