Skip to content

Conversation

AstreaTSS
Copy link
Member

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

Ever since the change to make Embed have images instead of image, it seems like there was a bug where embeds from messages (or from a passed-in dictionary in general) were not processed properly by Embed and so were missing from the resulting object. This PR fixes that.

Changes

  • Convert "image" field in a dict to "images" if detected when processing the dict for Embed.

Related Issues

Test Scenarios

  • Send message on Discord with an embed with an image.
  • Fetch that message, look at the embed, and observe the lack of an image in the resulting object.

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@LordOfPolls LordOfPolls merged commit 1bd1100 into interactions-py:unstable Jun 21, 2023
@AstreaTSS AstreaTSS deleted the image-embed-fix branch June 21, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants