Discord self-bot for streaming Plex content to voice channels.
⚠️ Warning: Self-bots violate Discord's Terms of Service. Use at your own risk.
- Video Streaming - Stream movies and TV shows via Discord Go Live
- Search - Find movies and TV shows from your Plex library
- Playback Controls - Pause, resume, seek, stop
- Episode Navigation - Skip to next episode for TV shows
- Now Playing - View current playback status with progress bar
- Node.js 18+
- FFmpeg (bundled via ffmpeg-static)
- Plex Media Server
- Discord user token (self-bot)
# Clone the repository
git clone https://github.com/yourusername/schrostream.git
cd schrostream
# Install dependencies
bun install
# Copy environment template
cp .env.example .env
# Edit .env with your credentialsEdit .env with your settings:
# Discord user token (not a bot token!)
DISCORD_TOKEN=your_discord_user_token
# Plex server URL and token
PLEX_URL=http://localhost:32400
PLEX_TOKEN=your_plex_token
# Optional settings
DEFAULT_QUALITY=1080
MAX_BITRATE=8000
AUDIO_BITRATE=192
PREFIX=!
⚠️ Never share your token with anyone. It grants full access to your account.
- Open Discord Web in your browser
- Press
F12(orCmd+Option+Ion Mac) to open Developer Tools - Go to the Network tab
- In the filter box, type
api - Send a message in any channel or perform any action
- Click on any request (e.g.,
messages,science, etc.) - In the Headers tab, scroll down to find
authorization - Copy the token value (it looks like
mfa.xxxxxorNzkyNTg...)
- Open Discord Web in your browser
- Press
F12to open Developer Tools - Go to Application tab (Chrome) or Storage tab (Firefox)
- Expand Local Storage → click
https://discord.com - Look for a key containing
token- the value is your token - If not found, use Method 1 (Network tab) instead
- Close Discord completely
- Navigate to Discord's storage folder:
- Windows:
%appdata%\discord\Local Storage\leveldb\ - macOS:
~/Library/Application Support/discord/Local Storage/leveldb/ - Linux:
~/.config/discord/Local Storage/leveldb/
- Windows:
- Open
.ldbfiles in a text editor and search foroken(token without the 't') - The token is the string that looks like
NzkyNTg...ormfa.xxxxx
Same as Method 1 - the Network tab approach works in both browser and desktop app (with DevTools enabled).
- Sign in to Plex Web App
- Navigate to any media item in your library
- Click the ⋮ (three dots) menu → Get Info
- Click View XML at the bottom of the info panel
- A new tab opens with XML data - look at the URL
- Find
X-Plex-Token=YOUR_TOKEN_HEREin the URL - Copy just the token value
- Go to plex.tv/devices.xml while logged in
- The page will show XML with your devices
- Find
token="YOUR_TOKEN"attribute - Copy the token value
- Open Plex Web App
- Press
F12to open Developer Tools - Go to Application tab (Chrome) or Storage tab (Firefox)
- Expand Local Storage → click on
https://app.plex.tv - Find the key
myPlexAccessToken - Copy the token value
If you've signed into Plex on this machine:
# macOS
cat ~/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml | grep -o 'PlexOnlineToken="[^"]*"'
# Linux
cat /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml | grep -o 'PlexOnlineToken="[^"]*"'# Development
bun dev
# Production
bun build
bun start| Command | Description |
|---|---|
!search <query> |
Search for movies/shows |
!play <number> |
Play selection from search results |
!stop |
Stop playback and leave voice |
!pause |
Toggle pause/resume |
!seek <time> |
Seek to time (e.g., 1:30:00, 45:00) |
!skip |
Skip to next episode (TV shows) |
!np |
Show now playing info |
!s→!search!p→!play!next→!skip!playing→!np
You: !search breaking bad
Bot: 🎬 Search Results for "breaking bad":
1. [Show] Breaking Bad (2008)
2. [Movie] El Camino: A Breaking Bad Movie (2019)
Use `!play <number>` to start streaming
You: !play 1
Bot: ▶️ Now Playing: Breaking Bad S01E01 - Pilot
⏱️ Duration: 58:00
You: !np
Bot: 🎬 Breaking Bad S01E01 - Pilot
▶️ Playing
[▓▓▓▓░░░░░░░░░░░░░░░░]
⏱️ 12:34 / 58:00 (21.6%)
You: !skip
Bot: ⏭️ Now Playing: Breaking Bad S01E02 - Cat's in the Bag...
⏱️ Duration: 48:00
src/
├── index.ts # Entry point
├── config.ts # Environment config
├── types/ # TypeScript types
├── bot/ # Discord client & commands
├── plex/ # Plex API integration
└── stream/ # FFmpeg transcoding & playback
SchroStream uses @dank074/discord-video-stream to enable full video streaming via Discord's Go Live feature. Videos are transcoded in real-time using FFmpeg to H.264 video + Opus audio.
- DEFAULT_QUALITY - Video height (480, 720, 1080)
- MAX_BITRATE - Video bitrate in kbps (recommended: 4000-8000)
- AUDIO_BITRATE - Audio bitrate in kbps (recommended: 128-192)
- Single stream per server - One active Go Live per Discord guild
- Self-bot risks - Account may be banned by Discord
- Network bandwidth - Requires good upload speed for high quality streams
MIT