This starter project lets you make fun generative art bots on Mastodon and Twitter!
Here's how to use it:
- Update
.env
with your api keys:
- Check out the
examples
folder for some example code you can use insidebot.js
. - Set up a free service (Uptime Robot, cron-job.org, or others) to wake up your bot every 25+ minutes and tweet. Use
https://PROJECT_NAME.glitch.me/BOT_ENDPOINT
as a URL to which to send the HTTP request.
To test your bot, you can remove the code that handles posting to Twitter/Mastodon, and view your generated image at https://PROJECT-NAME.glitch.me/image and https://PROJECT-NAME.glitch.me/gif if you enable the animate
option.
You can also update modules inside the generators
folder to get some more interesting results. Generative art is an exploration process! Start by changing around the code, then learn more about using the canvas element on the node-canvas Github page (check out some examples as well).
There are more tutorials and open source bots on Botwiki for your inspiration.
And be sure to join the Botmakers online hangout to share what you made, and submit your bot to Botwiki :-)
🙇
Powered by Glitch
\ ゜o゜)ノ