Go to file
2022-03-22 20:25:39 -04:00
events add code from codecat 2022-03-22 20:25:39 -04:00
modules add code from codecat 2022-03-22 20:25:39 -04:00
.dockerignore add code from codecat 2022-03-22 20:22:37 -04:00
.gitignore add code from codecat 2022-03-22 20:22:37 -04:00
cmdsplit.js add code from codecat 2022-03-22 20:25:39 -04:00
config.example.toml add code from codecat 2022-03-22 20:25:39 -04:00
Dockerfile add code from codecat 2022-03-22 20:25:39 -04:00
Dockerfile.base add code from codecat 2022-03-22 20:25:39 -04:00
index.js add code from codecat 2022-03-22 20:25:39 -04:00
LICENSE Initial commit 2022-03-22 21:58:12 +02:00
package.json add code from codecat 2022-03-22 20:25:39 -04:00
Radio.js add code from codecat 2022-03-22 20:25:39 -04:00
README.md add code from codecat 2022-03-22 20:22:37 -04:00
RedditRadio.js add code from codecat 2022-03-22 20:25:39 -04:00
Startup.js add code from codecat 2022-03-22 20:25:39 -04:00

Radiobot

Radio Bot based on codecat/reddit-radio

Features

  • Live radio re-streaming to voice channels (using multiple bot users), automatically turned on/off when someone joins/leaves the bound channel.
  • Other cool things.

Modules

A module is a class in the modules folder. It accepts the following methods:

  • constructor(config, client, bot) where config is the object directly from the config file, client is the Discord client, and bot is the RedditRadio object.
  • onCmdXxxx(msg, ...) where Xxxx is a command name like .xxxx.
  • onTick() is called every second.
  • onMessage(msg) is called whenever a message is sent in any channel. Return false if the message can pass through to other commands and handlers, or true to stop that from happening.

(Optional) How to run using Docker

You can use Docker and a mounted volume to easily run Reddit Radio.

The Reddit Radio Docker image is publically available on Docker Hub and can be found here and are automatically built each time a change is made to the master branch.

How to run using built image

  1. Create a folder where you'd like to run the docker image
  2. Create a folder called config or similiar to keep your configuration in
  3. Make a copy of config.example.toml called config.toml and place it in your config folder
  4. Edit the config file
  5. Run the following command docker run -d --name reddit-radio -v $(pwd)/config:/app/config codecatt/reddit-radio:latest

Running using Docker from the repo

  1. Clone this repo git clone https://github.com/codecat/reddit-radio.git
  2. Build the Docker image docker build . -t reddit-radio
  3. Create a folder called config or similiar to keep your configuration in
  4. Make a copy of config.example.toml called config.toml and place it in your config folder
  5. Edit the config file
  6. Run the following command docker run -d --name reddit-radio -v $(pwd)/config:/app/config reddit-radio

Note: For development you could map your whole code directory as follows: docker run -d --name reddit-radio -v $(pwd):/app reddit-radio