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

Separate ApplicationContext.respond() and followup() #645

Merged
merged 9 commits into from
Dec 26, 2021
Merged

Separate ApplicationContext.respond() and followup() #645

merged 9 commits into from
Dec 26, 2021

Conversation

hypergonial
Copy link
Contributor

Summary

Closes #438
This PR aims to separate ApplicationContext.respond() and ApplicationContext.followup() (new function) into two seperate functions. It also renames ApplicationContext.followup (attribute) to ApplicationContext.followup_webhook, but I am honestly unsure how to resolve this naming conflict, so please let me know if this should be adjusted.

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, ...)

@Lulalaby Lulalaby added this to In progress in v2.0 via automation Dec 26, 2021
@Lulalaby Lulalaby added this to the v2.0 milestone Dec 26, 2021
@Lulalaby Lulalaby added the priority: high High Priority label Dec 26, 2021
@Dorukyum
Copy link
Member

In my opinion .followup should be kept as it is and .respond shouldn't do any checks as it's a property.

Copy link
Member

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple suggestions aimed towards dynamically getting the class name for better maintainability, and I also renamed followup to send_followup, and followup_webhook to followup. I'll look over it and see about what @Dorukyum said about the changes though.

discord/commands/context.py Outdated Show resolved Hide resolved
discord/commands/context.py Outdated Show resolved Hide resolved
discord/commands/context.py Outdated Show resolved Hide resolved
discord/commands/context.py Outdated Show resolved Hide resolved
auto-merge was automatically disabled December 26, 2021 18:08

Head branch was pushed to by a user without write access

hypergonial and others added 6 commits December 26, 2021 19:08
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
@BobDotCom BobDotCom added priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer and removed priority: high High Priority labels Dec 26, 2021
plskillme x_x

Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
@BobDotCom BobDotCom merged commit 1c17e64 into Pycord-Development:master Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer
Projects
No open projects
v2.0
  
Done
Development

Successfully merging this pull request may close these issues.

Redesign ApplicationContext.respond
4 participants