crypt0biwan / curio-sales-bot

Curio sales bot
7 stars 3 forks source link

Implement twitter support #12

Closed fafrd closed 2 years ago

fafrd commented 2 years ago

This is a pretty big diff. The fun files to look at are server.js where I set up the twitter client, then utils/format.js where I create the twitter message. (format.js contains both the discord and twitter formatting code now.)

Similar to the discord formatting logic, the code will branch depending on whether or not it's dealing with a batch sale. If there's a batch sale, we'll upload the images of each card; twitter only supports 4 images, so if there are >4 images, we'll only keep the first 4 returned from the ethereum event.