- Make sure you have a populated images.js file (or generate one from ./scripts)
- Add a
.env
with preferred config (see.env.example
) - Populate
storage/2d5d14f95af035cbd8437948de61f94c
with your initial subscriptions - Add any existing subscriptions push logs to log folder (configure from env)
npm i
to install dependencies./app.mjs
to run code
We use node-persist
to store subscriptions between startups, and when moving installation from one
location to another. This is, in practice, just very basic stringified json file.
There are currently no tools for adding new subscriptions (might make some simple CLI or bot commands for managing them as needed), so populating this file is the main way to manage subscriptions.
To get started copy the 2d5d14f95af035cbd8437948de61f94c.example
file to storage/2d5d14f95af035cbd8437948de61f94c
. It contains examples of webhook and
channel type subscriptions. Minimal setup to just use webook:
- Remove
discord-channel
line - Add a unique string to
hookId
ondiscord-webook
line - Add the actual webook url to
hookUrl
ondiscord-webook
line - Modify
interval
ondiscord-webhook
line to preferred interval (ex 60000 for one image per minute, 60 seconds * 1000 ms) - Merge everything to one line, making sure to remove empty spaces (where line breaks used to be)
- On initial startup app will check for existing log file (to see which images might have already been pushed), then push first image