Fix TypeError when setting Embed.thumbnail and Embed.image property
#41
Reference in New Issue
Block a user
No description provided.
Delete Branch "2.0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixed
TypeError: image() takes 1 positional argument but 2 were givenChecklist
You are just supposed to do
url=But i did? My code is literally
e.set_image(url=avatar.with_size(1024).url)Could you show the code? From where you define
e?I think that's unrelated but here is the full code
Could I see the full traceback as well? In the original error you mentioned (
TypeError: image() takes 1 positional argument but 2 were given),image()seems to be the culprit, not set_image?Yea it is
image()that's what i changed in this PR,set_imageis justself.image = new_urlthat runsimage()which is a setter forimageproperty, and that setter'surlparam being keyword only breaks it...Oh. I failed to look properly at what the code was, my bad, sorry!
It has been brought to my attention that both image.setter and thumbnail.setter actually do not work if you later want to remove them. Changing to
Looks good. There's only a stray
returnin the thumbnail.setter which can be removed. Also may need a.. versionchanged:: 2.0to add that image/thumbnail can now be set this way?Like this?
I'm not good at wording and stuff so...
Thanks