rdragonz / hamyamdiscord

HamYam bot ported to Discord
GNU General Public License v3.0
4 stars 2 forks source link

Imgur Refactor PR #3

Closed JoeKlesczewski closed 1 year ago

JoeKlesczewski commented 1 year ago

Frankly, the Issues interface on GitHub is too limited for this. So I made a PR to make this easier to work with.

See issue #2

I will also say that this part of my code seems a bit redundant:

    image_b64 = base64.b64encode(image.content)
    # Now decode it from base64 to a BaseIO byte stream
    image_bio = BytesIO(b64decode(re.sub("data:image/jpeg;base64", '', image_b64)))

This might be easily simplified? But I'm not 100% sure of the format of the image data coming from the endpoint so I decided to play it safe.

rdragonz commented 1 year ago

PR changes user interface for returned embeds card. The card is required to maintain compliance with the credit requirements for using the hamqsl widgets. This will need to be slightly modified to re-introduce the card in the appropriate format.

rdragonz commented 1 year ago

Code review does not pass checks, further work is required.