A Discord user-installable app that converts music links (Spotify, Apple Music, YouTube Music) to SyncFM universal links via message context menus or the /share slash command.
Before running the bot, register the commands:
bun run registerTo list registered commands:
bun run list-commandsTo clear all commands:
bun run clear-commands- Convert to SyncFM (context menu) — Right-click any message containing a supported music URL and choose “Convert to SyncFM” to post the converted embed.
- /share — Run
/sharewith a supported URL to instantly post the converted SyncFM embed to the current channel.
Start the bot:
bun run startFor development with auto-reload:
bun run devThe bot will connect to Discord's Gateway and listen for interactions.
To enable PostHog analytics for conversion events, set the following environment variables:
POSTHOG_API_KEY=phc_your_project_api_key
# Optional overrides
POSTHOG_HOST=https://app.posthog.com
POSTHOG_DISABLED=false
POSTHOG_FLUSH_AT=1
POSTHOG_FLUSH_INTERVAL_MS=1000Leave POSTHOG_API_KEY unset (or set POSTHOG_DISABLED=true) to disable analytics entirely.
Build the Docker image:
docker build -t syncfm-discord .Run the container:
docker run -d \
-e DISCORD_BOT_TOKEN=your_bot_token \
-e DISCORD_CLIENT_ID=1429085779367428219 \
-e DISCORD_ENABLE_YOUTUBE=false \
# Optional PostHog analytics configuration
-e POSTHOG_API_KEY=phc_your_project_api_key \
-e POSTHOG_HOST=https://app.posthog.com \
-e POSTHOG_DISABLED=false \
--name syncfm-discord \
syncfm-discordOr use docker-compose:
docker compose up -d --buildFor subsequent restarts without rebuilding, drop --build.
MIT