https://github.com/brainboxdotcc/musicbot
A simple and effective D++ powered music bot for streaming local music on Discord
https://github.com/brainboxdotcc/musicbot
bot cpp discord dpp music music-bot
Last synced: 5 days ago
JSON representation
A simple and effective D++ powered music bot for streaming local music on Discord
- Host: GitHub
- URL: https://github.com/brainboxdotcc/musicbot
- Owner: brainboxdotcc
- License: apache-2.0
- Created: 2021-09-28T22:32:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T13:14:36.000Z (over 3 years ago)
- Last Synced: 2025-04-12T12:59:03.977Z (about 1 year ago)
- Topics: bot, cpp, discord, dpp, music, music-bot
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# D++ Local Music Bot (Pickle Rick)
This is a basic streaming bot for Discord powered by the [D++ library](https://dpp.dev) which streams a local MP3 collection from a directory. It has a secific use case and there are no plans to add streaming of YouTube etc to this bot (but you can fork this project and do what you want with it).
## Compilation
mkdir build
cd build
cmake ..
make -j
If DPP is installed in a different location you can specify the root directory to look in while running cmake
cmake .. -DDPP_ROOT_DIR=
## Running the template bot
Create a config.json in the directory above the build directory:
```json
{
"token": "your bot token here",
"homedir": "/path/to/mp3s",
"homeserver": "server id of server where the bot should run"
}
```
You should then make a file called `songindex.txt` within the mp3 directory which contains a list of relative filenames of all MP3 files within that directory. You can build such a file with a command like `cd /path/to/mp3s; find . -name '*.mp3'`. When the bot is running, updating this text file immediately updates the index of available songs.
Start the bot:
cd build
./musicbot