Giter Site home page Giter Site logo

parzival-space / discord-radio-bot Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 8.0 857 KB

Plays radio streams directly inside your Discord server.

Java 100.00%
discord discord-bot eris-discord eris-discord-bot audio-streaming audio icecast ffmpeg docker

discord-radio-bot's Introduction

Discord Radio Bot

Important

You are currently viewing the Java rewrite of the bot. I am not done yet, and some features are missing. If you are looking for the old Node.js-based version, click here.

Plays radio streams directly within your Discord server. This bot has no commands; it's for playing radio streams only. You can specify your own radio stream in the config.

How to

Requirements

You need the following:

  1. Create a new Bot User: First, you need to create a new bot account.
    Head over to the Discord Developer Portal, create a new bot instance, and get the bot token.
  2. A working JRE setup: If you do not have one already, get it here: AdoptOpenJDK

Running the Bot

Download the latest release.

Then you have to create a file called application.properties in the same directory as the bot (the jar file you you just downloaded). Fill it like so:

discord.token=<<your token>>
discord.channel=<<your channel id>>
stream.url=<<your url>>

And run it: java -jar radiobot.jar

discord-radio-bot's People

Contributors

parzival-space avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

discord-radio-bot's Issues

Bot seems to die after a day, not sure if it's from lack of activity in stage or something different

node:events:505
      throw er; // Unhandled 'error' event
      ^
Error: 1001:
    at WebSocket.<anonymous> (/home/ufinexa/UfiRadio/node_modules/eris/lib/voice/VoiceConnection.js:348:55)
    at WebSocket.emit (node:events:527:28)
    at WebSocket.emitClose (/home/ufinexa/UfiRadio/node_modules/ws/lib/websocket.js:246:10)
    at TLSSocket.socketOnClose (/home/ufinexa/UfiRadio/node_modules/ws/lib/websocket.js:1148:15)
    at TLSSocket.emit (node:events:539:35)
    at node:net:715:12
    at TCP.done (node:_tls_wrap:581:7)
Emitted 'error' event on VoiceConnection instance at:
    at VoiceConnection.disconnect (/home/ufinexa/UfiRadio/node_modules/eris/lib/voice/VoiceConnection.js:432:22)
    at WebSocket.<anonymous> (/home/ufinexa/UfiRadio/node_modules/eris/lib/voice/VoiceConnection.js:365:22)
    at WebSocket.emit (node:events:527:28)
    [... lines matching original stack trace ...]
    at TCP.done (node:_tls_wrap:581:7)

This is what I have had when leaving the bot to do it's own thing, usually lasts about a day, few hours minimum before this pops up

Add CI/CD

I want to add Build- and Release-Pupelines to the new codebase.

Bot stops playback when the radio stream is interrupted

The bot does not play the data if the chunk size (in playback time) is equal to the transmission interval.
For example, a radio station that sends 1-second chunks at a 1-second interval causes the audio stream to close too soon.

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.