Git Product home page Git Product logo

discord-audio-stream-bot's Introduction

Discord Audio Stream Bot

A simple discord audio streaming bot.

Preview: Streaming to discord ("speaking")

preview

  1. Audio source (e.g. your voice, music from file, sound from game)
  2. Recording device (e.g. microphone, Virtual Cable)
  3. Discord Audio Stream Bot (this software)
  4. Discord Voice Chat (discord)

Getting started

Part 1 - Bot user

  • Create a discord developer application here
  • In the bot tab, add a bot user
  • Copy the bot token
  • Enable the "SERVER MEMBERS INTENT" (required to check if a user issuing a command has sufficient permissions)

Part 2 - Bot program

  • Check that a Java Runtime Environment, version 1.8 / 8 (JRE v1.8 / v8) or higher with an architecture matching your computer is installed and that the folder containing java.exe & javaw.exe is added to the PATH system environment variable - otherwise it crash in the next step!
  • Run the bot program using "run win.bat"
    Note: This step is only valid for Windows. If you intend to run it on mac or linux, I would appreciate your help in making launch scripts or submitting explanations for this document!
  • In the settings tab, paste your bot token and hit return
  • In the home tab, click the big on/off button to log in to the bot user with the token
  • In the maintenance tab, invite/add the bot to a guild/server, if necessary

Part 3 - Command introduction

  • Now you can enter commands - either by sending a direct message in a private channel to the bot user or from within a channel of a guild/server shared by you and the bot user. Start by typing a slash ("/") to get a list of available commands for all applicable bots
  • As an example, type "/about" to get a link to this repo ("/about public:True" to also show that to other users)
  • Use "/bind" to restrict command usage to one or more channels in a guild
  • Use "/autojoin" or "/follow-audio" to automate joining audio channels (being a voice or stage channel)

Part 4 - Test run

  • Issue the command "/join" to bring the bot user up in a voice channel
  • In the settings tab of the bot program, unmute the bot
  • Choose & select a recording device (default one being your microphone, most likely)
  • Now it should be sending audio from the selected recording device to discord. Enjoy!

macOS (credits to spkane)

Building

  • Install homebrew if you do not already have it, then:
    • brew install gradle
    • gradle build
    • cd build/distributions
    • tar -xvf Discord-Audio-Stream-Bot-1.0-SNAPSHOT.tar

Usage

  • Follow the build steps above, then:

    • cd Discord-Audio-Stream-Bot-1.0-SNAPSHOT
    • DISCORD_AUDIO_STREAM_BOT_OPTS='-Djava.library.path="/usr/lib:../../../natives/mac/" --add-exports="java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED"' ./bin/Discord-Audio-Stream-Bot
  • Loopback is a very good virtual audio cable application for macOS

Downloads

Releases

Tools

  • Virtual Cable (A virtual audio device working as virtual audio cable - After installation, restart bot program and set the recording device in settings tab to "CABLE Output (VB-Audio Virtual Cable)". Don't forget to stream audio into the device CABLE Input or else you'll hear nothing)

  • Audio Router (To replug your favourite audio source to play into CABLE Input, if it doesn't support switching audio output)

paypal

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.