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

Add file and files parameters to InteractionResponse.edit_message() #1340

Merged
merged 5 commits into from
May 13, 2022

Conversation

baronkobama
Copy link
Contributor

@baronkobama baronkobama commented May 10, 2022

Summary

This PR adds the file and files parameters to the InteractionResponse.edit_message() method.

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

@Pycord-Development Pycord-Development deleted a comment from codecov bot May 10, 2022
@plun1331
Copy link
Member

Maybe this could be implemented as well?

pycord/discord/message.py

Lines 1324 to 1326 in 70646f2

if "attachments" not in payload:
# don't want it to remove any attachments when we just add a new file
payload["attachments"] = [a.to_dict() for a in self.attachments]

Ensure that previous attachments are kept when we edit with files.
@Pycord-Development Pycord-Development deleted a comment from codecov bot May 11, 2022
@Lulalaby Lulalaby enabled auto-merge (squash) May 11, 2022 10:37
@Pycord-Development Pycord-Development deleted a comment from codecov bot May 11, 2022
@plun1331 plun1331 added status: awaiting review Awaiting review from a maintainer feature Implements a feature labels May 11, 2022
plun1331
plun1331 previously approved these changes May 11, 2022
discord/interactions.py Outdated Show resolved Hide resolved
@Pycord-Development Pycord-Development deleted a comment from codecov bot May 11, 2022
@Lulalaby Lulalaby merged commit 702daef into Pycord-Development:master May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature status: awaiting review Awaiting review from a maintainer
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

6 participants