A lightweight Discord bot that functions as a chat widget for OBS, displaying messages in your stream overlay with clean animations.
- Simple commands:
/startto begin monitoring,/stopto pause - Beautiful chat display: Clean animations and customizable appearance
- OBS-ready: Easy to add as a browser source
- Lightweight: Built with Bun for fast performance
- Extensible: Contributions welcome for Node.js compatibility
- Bun installed
- Discord developer account
- Access to a Discord server
-
Clone the repository
git clone https://github.com/yourusername/dstream-bot.git cd dstream-bot -
Install dependencies
bun install
-
Set up environment variables
- Copy
.env.exampleto.envin the/botdirectory - Fill in your Discord credentials:
PUBLIC_KEY=your_public_key APPLICATION_ID=your_app_id SECRET_KEY=your_secret_key SECRET_TOKEN=your_bot_token SERVER_ID=your_server_id # Optional: Change default port if needed SOCKET_PORT=8000
- Copy
-
Run the bot in development mode
bun dev
-
Run the bot
bun start
-
Set up OBS
- Add a Browser Source in OBS
- URL:
http://localhost:5173(or your custom frontend URL) - Width: 400px (recommended)
- Height: 600px (recommended)
| Command | Description |
|---|---|
/start |
Begins monitoring the current channel |
/stop |
Stops monitoring the current channel |
The frontend runs on http://localhost:5173 by default. You can configure:
- WebSocket port: Must match your bot's
SOCKET_PORT(default: 8000) - Appearance: Customize colors and layout via CSS variables
bun run devbun run buildWe welcome contributions! While the primary runtime is Bun, we're open to:
- Node.js compatibility patches
- New features
- UI improvements
- Bug fixes
Please open an issue to discuss your proposed changes before submitting a PR.
- Order matters: The bot must be running before starting the frontend
- Permissions: Your bot needs:
View ChannelspermissionRead Message HistorypermissionSend Messagespermission
- Security: Never commit your
.envfile!
MIT License - See LICENSE for more information.
Enjoy streaming with DStream Bot! For support, please open an issue in the repository.
