Coder Social home page Coder Social logo

mrjackyliang / discord-audio-stream-bot Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 4.0 356 KB

Effortlessly stream audio from your computer's output directly into your Discord server

Home Page: https://github.com/mrjackyliang/discord-audio-stream-bot

License: ISC License

JavaScript 100.00%
discord discord-bot audio audio-player audio-stream music-bot-discord portaudio audio-strea

discord-audio-stream-bot's Introduction

Discord Audio Stream Bot

GitHub Releases GitHub Top Languages GitHub License Become a GitHub Sponsor Donate via PayPal

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:

  1. Install the dependencies
  2. Configure this bot to use your Discord bot token
  3. Begin to stream audio on Discord

Install Dependencies

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.

  1. Install Homebrew to run the commands below
  2. Install FFmpeg by running brew install ffmpeg
  3. Install NodeJS by running brew install node
  4. Tap into the DASBot directory with cd discord-audio-stream-bot
  5. Install project dependencies by runningnpm install

Configure Loopback Device

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.

Rogue Amoeba's Loopback with Spotify Audio

  1. In the bottom left corner, click New Virtual Device
  2. With Loopback Audio highlighted, rename the device to Spotify
  3. Click on the Pass-Thru source, and then Delete
  4. To the right of Sources, click + > Select Application...
  5. Select Spotify and then click Open

Configure Application

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.

  1. First go to the Discord Developer Portal
  2. In the top right corner, click New Application
  3. Under the Name field, type "DASBot"
  4. When the application is created, click the Bot menu item
  5. Click Add Bot and then click Yes, do it!
  6. Click the General Information menu item
  7. Under Client ID, click Copy
  8. Replace the CLIENT_ID_HERE below and visit link:
    • https://discord.com/oauth2/authorize?client_id=CLIENT_ID_HERE&scope=bot&permissions=36719872

Configure the Discord Bot Token

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.

  1. Create a .env file using the contents of .env.sample by running cp .env.sample .env
  2. Go to the Discord Developer Portal and click the Bot menu item
  3. Under Token, click Copy to copy the Discord bot token
  4. Open the .env file and replace YOUR_DISCORD_CLIENT_TOKEN_HERE with the token

Launch the DASBot

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.

Terminal running DASBot

  1. Start off by typing npm start to start DASBot
  2. Using the arrow keys, select Spotify, then press Return (or Enter)
  3. When you see Server is ready ..., open Discord
  4. In Discord, type @DASBot, and then DASBot will respond

discord-audio-stream-bot's People

Contributors

mrjackyliang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.