How does the Slack Meme Bot work, technically?
docker-compose exists of two services
halverneus/static-file-server makes the memes accessible from the internet.
The Slack WebHook sends just the url of the meme, after which Slack attempts to download the image before actually posting it.
If Slack cannot download the image, nothing will show up in your Slack channel.
You will probably need to configure the meme file accessibility.
chmod -R 755 memes_dir
Dockerfile copies the
job folder with the Node program to the docker container
and then runs
start.sh which schedules running
slack-meme-poster.js and starts the Cron daemon.
Slack Meme Poster
slack-meme-poster.js selects a random file from your
MEMES_DIR and moves it to
already-sent subfolder to make sure no meme is ever posted twice.
It then sends the meme url to Slack using the WebHook and 🎉, meme posted!
Make it your own
messageToPostWithMeme: A simple string sent along with the meme
- Configure the entire Slack message using the Slack Block Kit Builder