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 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 upThis 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 botThe 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.
- Create a database on Turso — the free plan is far more than this bot needs:
turso db create letterboxd-bot turso db show letterboxd-bot --url # -> libsql://letterboxd-bot-<org>.turso.io turso db tokens create letterboxd-bot - 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=... \ TURSO_DATABASE_URL='libsql://letterboxd-bot-<org>.turso.io' \ TURSO_AUTH_TOKEN='...'
- Deploy:
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.tsA 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 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.)
