BlackWolfWoof/yagpdb-cc

image_reaction.yag on URLs not functioning

kastleghost opened this issue · 2 comments

Hi, currently as it stands the coding within ImageReaction allows any URL to be posted whether its an image URL or not. Something within the Embed Media cmdlet doesn't appear to be functioning correctly and its either not looking at URLs ending extension i.e. ".jpg" similar to .Message.Attachments OR its too wide-open and needs to query from something like the AutomoderationV2 List function so we can Whitelist sites.

P.S. amazing script and appreciate the work and time that went into this. Not really a deal breaker if nothing can be done for the things I mentioned. Just more of pointing out some things that may or may not need to be addressed.

imagereact_not_blocking_any_non_image_url

The link has a thumbnail field.
And the thumbnail has an image url, and thats how it triggers.

You may have seen people use their own domains to upload screenshots to.
The links then look like https://example.com/loPOhRdstZ or so and embed the image as thumbnail.

When i had it on to only look for extientions and stuff this wouldn't have worked.
I think the same also goes for twitter links.

If you have a fix for that feel free to mention it to me. Otherwise i don't think there is a fix for it.

That's fair and figured it would be an impractical thing to address because of what you mentioned. Pretty much the only solution would to be to somehow trigger a whitelisting function. In any case thank you for the amazing code and definitely using it within my Discord.