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

fix: webhooks not sending attachment info #2513

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NeloBlivion
Copy link
Member

Summary

This adds attachments to the multipart payload sent in webhooks, which previously didn't exist. This only impacted description, but necessary to implement nonetheless.
I HOPE this doesn't break anything, but further testing with editing attachments would be appreciated.

Information

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

Checklist

  • I have searched the open pull requests for duplicates.
  • 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.
  • I have updated the changelog to include these changes.

@@ -644,8 +644,9 @@ def handle_message_parameters(
payload["embeds"] = [] if embed is None else [embed.to_dict()]
if content is not MISSING:
payload["content"] = str(content) if content is not None else None
attachments = []
Copy link
Member

Choose a reason for hiding this comment

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

This makes the line below obsolete

Copy link
Member Author

Choose a reason for hiding this comment

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

then += instead? it needs to be defined outside the if

Copy link
Member

Choose a reason for hiding this comment

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

I think you intended to create a new variable, but this one overshadows the parameter with the same name.

Copy link
Member

Choose a reason for hiding this comment

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

Or it needs to be put in an else after the if

@Lulalaby Lulalaby added this to the v2.7 milestone Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants