Games-Gamers / FamBot

FAM
3 stars 0 forks source link

Bug fixes for VideoLinkEmbeds cog #71

Closed WikiWikiWasp closed 1 year ago

WikiWikiWasp commented 1 year ago

Fixes

Updated the AI generated message to be shorter and to drop the "gamer" personality. Should hopefully be only 1-2 sentences and focus on the "zoomer" personality.

Twitter embeds that were just text were triggering the fix link repost, so I added a condition to ignore twitter embeds even without videos. This might need to be readdressed later for the exceptions where a twitter embed is supposed to have a video but it doesn't load it. It will currently skip those instead of fixing them, but at least it will resolve the issue right now where it reposts for no reason.

Also added a change to ignore already modified links so it doesn't add the prefix characters redundantly, breaking the link.

Still Broken

String case is either being lowered before the content is passed into the cog, somewhere in string manipulation, or during bot message sending. Need to figure out where this is happening, as it's breaking the links that are case-sensitive.