cujarrett / destiny-insights-bot

It's a serverless Twitter bot powered by JavaScript and AWS that tweets Destiny 2's note worthy items such as mods, high stat armor, or well rolled weapons available for sale.
MIT License
10 stars 1 forks source link

Mod details (aka auto TinCanBeef) #329

Open meyer opened 2 years ago

meyer commented 2 years ago

Any interest in adding mod details to mod tweets? When I wrote the mod bot for my clan discord I dug into the vendor API a bit and it ended up being pretty easy to add mod details and stat bumps. For ultimate character savings the mod details could be a generated image (web app screenshotted in headless chrome perhaps?)

Here’s what my mod bot posts to discord: image

If you’re into the idea I’d be down to contribute.

cujarrett commented 2 years ago

Hi @meyer , I've gone back and forth on this. It's helpful info for sure I think.

For ultimate character savings the mod details could be a generated image (web app screenshotted in headless chrome perhaps?)

I think this is the only way to do it as character limits are limiting. I've not looked into packages that offer the ability to build out some HTML or DOM and then render it to an image. I assume it's doable. What are you using in the above example screenshot?

meyer commented 2 years ago

that screenshot above is just using discord embeds, so no image magic going on there. (yet! I eventually would like to composite the element and energy cost onto the mod images but i don’t really want to store derived images.)

The inspiration for the screenshot idea comes from a separate thing I’m working on that generates screenshots with puppeteer. Works reasonably well—the main blocker right now is that I need to build the web app that it screenshots 😆 It’s kinda neat. You can generate a screenshot with device scale factor set to 2x, so the output ends up looking pretty crisp, especially if you’ve got SVGs in the screenshotted page. Puppeteer + headless Chrome runs just fine on Firebase cloud functions so I’m assuming it would run on AWS just fine too.