A small utility that captures audio from a local source and broadcasts it to a Discord server. DASBot requires several dependencies and has been developed and tested on macOS.
To use this Discord bot, you would need to:
- Install the dependencies
- Configure this bot to use your Discord bot token
- Begin to stream audio on Discord
Before we configure and run DASBot, you would require NodeJS, FFmpeg, and a virtual device driver such as Rogue Amoeba's Loopback. Follow the directions below to get started.
- Install Homebrew to run the commands below
- Install FFmpeg by running
brew install ffmpeg - Install NodeJS by running
brew install node - Tap into the DASBot directory with
cd discord-audio-stream-bot - Install project dependencies by running
npm install
If you have not installed Rogue Amoeba's Loopback, now is the time to do so. The instructions below assumes that you have already installed and opened the application. Spotify will be used in this example.
- In the bottom left corner, click New Virtual Device
- With Loopback Audio highlighted, rename the device to Spotify
- Click on the Pass-Thru source, and then Delete
- To the right of Sources, click + > Select Application...
- Select Spotify and then click Open
Below are the instructions on how you can create a Discord bot and add the Discord bot into your server. Once that is done, we will proceed to configure the connection between DASBot and the Discord bot.
- First go to the Discord Developer Portal
- In the top right corner, click New Application
- Under the Name field, type "DASBot"
- When the application is created, click the Bot menu item
- Click Add Bot and then click Yes, do it!
- Click the General Information menu item
- Under Client ID, click Copy
- Replace the
CLIENT_ID_HEREbelow and visit link:https://discord.com/oauth2/authorize?client_id=CLIENT_ID_HERE&scope=bot&permissions=36719872
The project includes a .env.sample file. An .env file will be created here. The instructions below assumes you are still inside the discord-audio-stream-bot directory.
- Create a
.envfile using the contents of.env.sampleby runningcp .env.sample .env - Go to the Discord Developer Portal and click the Bot menu item
- Under Token, click Copy to copy the Discord bot token
- Open the
.envfile and replaceYOUR_DISCORD_CLIENT_TOKEN_HEREwith the token
Once the final configuration is completed, it is now time to launch the bot. The instructions below assumes you are still inside the discord-audio-stream-bot directory.
- Start off by typing
npm startto start DASBot - Using the arrow keys, select Spotify, then press Return (or Enter)
- When you see
Server is ready ..., open Discord - In Discord, type
@DASBot, and then DASBot will respond

