Skip to content

Conversation

@caffe-ian
Copy link
Contributor

@caffe-ian caffe-ian commented Nov 8, 2021

Summary

Added file and files keyword arguments to discord.Message.edit

file: Sequence[:class:File]
To add a new file to the message
files: List[Sequence[:class:File]]
To add new files to the message

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • 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, ...)
  • Added file and files keyword arguments to discord.Message.edit function.
  • Edited docstrings for file and files keyword arguments in discord.Message.edit function.
  • Added an extra edit function and edited edit functions with overload decorator, with file and files keyword arguments.

Note

Test it out before merging, there might be other errors.

Added edit_files and edit_multipart_helper functions
Added file and files keyword arguments into the edit function
Edited docstrings for the file and files keyword arguments
Added an extra edit function with overload decorator, with file and files keyword arguments
Default value for file and files keyword argument changed from None to MISSING
state.http.edit_files -> self._state.http.edit_files
channel.id -> self.channel.id
Reedited and simplified message.py
Reedited and simplified http.py
@CodeWithSwastik CodeWithSwastik requested a review from zeffo November 8, 2021 03:07
zeffo
zeffo previously approved these changes Nov 8, 2021
Copy link
Contributor

@zeffo zeffo left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@Lulalaby Lulalaby enabled auto-merge November 8, 2021 09:19
Copy link
Contributor

@EnokiUN EnokiUN left a comment

Choose a reason for hiding this comment

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

Looks great, just add comments to make it clear what you're doing.

@caffe-ian
Copy link
Contributor Author

Looks great, just add comments to make it clear what you're doing.

Basically the same as send_files but changing route method to 'PATCH' and also handles some missing arguments.

@zeffo
Copy link
Contributor

zeffo commented Nov 8, 2021

It's pretty straightforward comments aren't really necessary imo

@Dorukyum
Copy link
Member

Dorukyum commented Nov 8, 2021

These are not to be used manually, so as Zeffo said comments are not necessary.

@izxxr izxxr added feature Implements a feature priority: low Low Priority status: awaiting review Awaiting review from a maintainer labels Nov 8, 2021
Lulalaby
Lulalaby previously approved these changes Nov 8, 2021
Copy link
Contributor

@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.

Please merge the head branch into this so checks can run correctly

@Lulalaby Lulalaby disabled auto-merge November 9, 2021 00:34
@Lulalaby Lulalaby enabled auto-merge November 9, 2021 00:34
auto-merge was automatically disabled November 11, 2021 04:44

Head branch was pushed to by a user without write access

@caffe-ian caffe-ian dismissed stale reviews from Lulalaby and zeffo via dd0a0d0 November 11, 2021 04:44
@BobDotCom BobDotCom enabled auto-merge November 11, 2021 04:46
@BobDotCom BobDotCom merged commit 4d8b3d9 into Pycord-Development:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Implements a feature priority: low Low Priority status: awaiting review Awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants