A Discord selfbot that joins a voice channel and streams Fallen Kingdom on loop using Go Live.
Note:
FallenKingdom.mp4is not included in this repository due to file size. Add it to the project root before running.
- Node.js 22 LTS or newer
- FFmpeg + FFprobe (BtbN static build recommended) added to PATH
- How To Install ffmpeg on Windows 10 and 11 (And add it to PATH)
- A Discord account token (selfbot)
There is currently a bug where the stream may fail or stop broadcasting if left running for a long period of time. I am looking into a fix that keeps the call timer active if possible, but progress is slow as I am currently busy with university assignments and other projects.
If you have experience with Discord.js selfbot stream stability and would like to contribute, feel free to open a PR or an issue.
1. Clone and install dependencies
git clone https://github.com/Sighyu/FallenKingdomBot.git
cd FallenKingdomBot
npm install2. Add your video file
Place your video file in the project root and name it FallenKingdom.mp4, or update the VIDEO_PATH constant in index.js to match your filename.
3. Configure environment
Copy .env.example, rename it to .env, and set your token:
TOKEN=your_discord_selfbot_token_here
4. Configure the channel
Edit index.js and set CHANNEL_ID to your target voice channel ID.
Locally
npm startOn a VPS with PM2 (recommended for 24/7)
npm install -g pm2
pm2 start index.js --name fallen-kingdom --node-args="--env-file=.env"
pm2 save
pm2 startupUseful PM2 commands:
pm2 logs fallen-kingdom # live logs
pm2 status # process status
pm2 restart fallen-kingdom # restart
pm2 stop fallen-kingdom # stop| Setting | Value |
|---|---|
| Resolution | 1280×720 |
| Frame rate | 24 fps |
| Video codec | H264 (x264 veryfast) |
| Video bitrate | 4000 kbps avg / 6000 kbps max |
| Audio bitrate | 128 kbps |
| Stream type | Go Live |
| Loop | Yes |
| Constant | Default | Description |
|---|---|---|
CHANNEL_ID |
— | Target voice channel ID |
REJOIN_INTERVAL_MS |
1 * 60 * 60 * 1000 (1 hour) |
How often the go-live stream restarts to prevent blank screens. Change the first number to adjust (e.g. 6 for 6 hours) |
WAIT_FOR_VIEWERS |
true |
When enabled, the bot joins voice but waits to start go-live until someone else is in the channel. Helps save on bandwidth |
- Looping Go Live — Streams the video on repeat via Discord Go Live.
- Auto stream refresh — Periodically restarts the go-live stream (default: every 1 hour) to prevent the blank/stale screen issue on long-running streams. The bot stays in the voice channel.
- Auto-reconnect — If the bot is disconnected from voice, it automatically reconnects and resumes streaming.
- Wait for viewers — When
WAIT_FOR_VIEWERSistrue, the bot won't start go-live until at least one other person is in the voice channel. If people are already present at startup, it starts immediately. The stream keeps running after viewers leave. - Filtered voice logs — Join/leave/move events in the console are filtered to only show activity from the bot's server.
Not sure what settings to use for your video? Run
ffprobe -v quiet -print_format json -show_streams yourfile.mp4and paste the output into an AI (ChatGPT, Copilot, etc.) and ask it to recommend the bestSTREAM_OPTIONSvalues for Discord Go Live streaming. It will read the resolution, frame rate, bitrate, and codec directly from your file and suggest optimal settings.