
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); pass 0 to unsnoozeRight 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-bot
Make 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 .env
Data is stored in SQLite via Prisma — no database server needed. Locally the database is just a file at prisma/dev.db, created automatically the first time you run migrations. In production the bot talks to a hosted Turso database over libSQL.
Install dependencies once:
pnpm install
Then bring up the whole dev environment with one command:
pnpm up
This applies any pending migrations to the local SQLite file and runs the bot with hot reload.
If you’d rather run the pieces separately:
pnpm db:migrate # apply migrations (creates prisma/dev.db)
pnpm dev # run the bot
The bot is a long-running worker (Discord gateway + a 1-minute cron loop). It needs an always-on host plus a database. A Dockerfile is included so you can deploy to any container platform.
turso db create letterboxd-bot
turso db show letterboxd-bot --url # -> libsql://letterboxd-bot-<org>.turso.io
turso db tokens create letterboxd-bot
flyctl and run fly launch --no-deploy --copy-config from the repo root. If the app name letterboxd-discord-bot is taken, Fly will prompt you for a different one — update fly.toml to match.fly secrets set \
DISCORD_CLIENT_ID=... \
DISCORD_TOKEN=... \
TURSO_DATABASE_URL='libsql://letterboxd-bot-<org>.turso.io' \
TURSO_AUTH_TOKEN='...'
fly deploy — schema migrations are applied automatically on startup.If you’re moving off a previous Postgres deployment (e.g. Neon), stop the bot, apply the schema to Turso, then copy the rows with the included one-off script:
TURSO_DATABASE_URL='libsql://...' TURSO_AUTH_TOKEN='...' pnpm db:deploy
POSTGRES_URL='postgresql://...' \
TURSO_DATABASE_URL='libsql://...' TURSO_AUTH_TOKEN='...' \
NODE_PATH=./ pnpm exec ts-node src/tools/migrate-data.ts
A workflow at .github/workflows/deploy.yml deploys to Fly on every push to main. To use it on your fork:
fly tokens create deploy and copy the token.FLY_API_TOKEN (Settings → Secrets and variables → Actions).main.The included Dockerfile works on any container host — Railway, Render, DigitalOcean, a VPS, etc. The bot needs four env vars: DISCORD_CLIENT_ID, DISCORD_TOKEN, TURSO_DATABASE_URL, TURSO_AUTH_TOKEN. (Alternatively, on a host with a persistent volume you can skip Turso entirely and set DATABASE_URL=file:/path/to/bot.db.)