Skip to content

[BUG] Images doesn't return all the image in the embed. #1508

Open
@AlphaGaming7780

Description

@AlphaGaming7780

Library Version

5.8.0

Describe the Bug

I set 2 images in an embed using this code :

newEmbed = initialPost.embeds[0]
newEmbed.images = [
	EmbedAttachment(
		url=newEmbed.images[0].url
	),
	EmbedAttachment(
		url=modal_ctx.responses["ArtSubmitionPreviewImagelink"]
	)
]

Once this code is run, the embed look like this and it has 2 images:
image

After I try to take the URL of the second image using this code line: newEmbed.images[1].url
result :

    newEmbed.images[1].url
    ~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

cause when I print the images property using this line : print(newEmbed.images) I have : [EmbedAttachment()]

I also try to edit the first image using this code :

newEmbed.images[0] = EmbedAttachment(
	url=modal_ctx.responses["ArtSubmitionBigImageLink"]
)

Result : the image get updated, but it removes the second image.
image

Steps to Reproduce

It's explained above.

Expected Results

When using the images property, it should return all the EmbedAttachment().

Minimal Reproducible Code

No response

Traceback

No response

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingon holdThis issue/PR is on hold pending higher priority issues/PRs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions