This a simple bot that posts new diary entries from your Letterboxd friends to your preferred Discord channel.
Use this handy link to add the bot.
Or follow the instructions below on how to host the bot yourself.
/add- Subscribes to a Letterboxd user's new diary entries/remove- Unsubscribe a Letterboxd user/list- See a list of all the current users/channel- Update which channel to post to. (Defaults to the system channel)/snooze- Mute a user's posts for N hours (max 720); pass0to unsnooze
Right now all this bot does is scrape RSS feeds to find the latest entry. I'm hoping to get access to Letterboxd API to introduce new functionality.
Note
If you want more than just a diary poster, check out Filmlinkd — a more feature-rich Letterboxd Discord bot.
Clone this repo to your computer.
git clone git@github.com:caseypugh/letterboxd-discord-bot.git
cd letterboxd-discord-botMake sure you have Node 24 installed. If you're using nvm...
nvm install 24
nvm use 24
Create an .env from the sample file and fill in your Discord credentials.
cp .env.sample .envData is stored in Postgres via Prisma. The repo includes a docker-compose.yml for local development — start it with:
docker compose up -dThis runs Postgres 17 on localhost:5432 with the credentials already wired into .env.sample. To stop it: docker compose down. Data persists in a Docker volume between restarts.
If you'd rather use a Postgres install of your own, just update DATABASE_URL in .env.
Install dependencies once:
pnpm install
Then bring up the whole dev environment with one command:
pnpm upThis starts the local Postgres container (waits for it to be healthy), applies any pending migrations, and runs the bot with hot reload.
If you'd rather run the pieces separately:
docker compose up -d # start Postgres
pnpm db:migrate # apply migrations
pnpm dev # run the botThe bot is a long-running worker (Discord gateway + a 1-minute cron loop). It needs an always-on host plus a Postgres database. A Dockerfile is included so you can deploy to any container platform.
- Create a Postgres database on Neon and copy the connection string.
- Install
flyctland runfly launch --no-deploy --copy-configfrom the repo root. If the app nameletterboxd-discord-botis taken, Fly will prompt you for a different one — updatefly.tomlto match. - Set secrets:
fly secrets set \ DISCORD_CLIENT_ID=... \ DISCORD_TOKEN=... \ DATABASE_URL='postgresql://...neon.tech/...?sslmode=require'
- Deploy:
fly deploy
A workflow at .github/workflows/deploy.yml deploys to Fly on every push to main. To use it on your fork:
- Run
fly tokens create deployand copy the token. - Add it to your repo's secrets as
FLY_API_TOKEN(Settings → Secrets and variables → Actions). - Push to
main.
The included Dockerfile works on any container host — Railway, Render, DigitalOcean, a VPS, etc. The bot needs three env vars: DISCORD_CLIENT_ID, DISCORD_TOKEN, DATABASE_URL (Postgres).
