An open API service indexing awesome lists of open source software.

https://github.com/nat1anwastaken/lava

由 Lavalink 驅動且擁有眾多功能且完全開源、免費的音樂機器人
https://github.com/nat1anwastaken/lava

discord discord-bot discord-py disnake docker docker-compose lavalink lavalink-musicbot music music-bot music-effect python3 self-hosted

Last synced: 4 months ago
JSON representation

由 Lavalink 驅動且擁有眾多功能且完全開源、免費的音樂機器人

Awesome Lists containing this project

README

          

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]





Logo

Lava


Multi funtion free & open source Discord music bot powered by Lavalink


Read more »




中文
·


Try it out!(Chinese server)
·
Bug report
·
Request new features


Table of contents



  1. Screenshots


  2. Get started


  3. Usage

  4. Configs

  5. ToDo

  6. License

  7. Contributing



## Screenshots

![player][player-screenshot-en]

(Back to top)

## Get started

If you just want to experiment what the bot is like, you can join [Yeecord(Chinese)][yeecord] and use `Lava#8364` there

### One click setup

You can use this one click script [LavaLauncher][LavaLauncher], and follow the steps to setup Lavalink and the Discord bot
### Docker

Docker compose

Make sure that Docker is installed on your computer or server already then:

1. Clone this Repository
```bash
git clone https://github.com/Nat1anWasTaken/Lava.git
```

2. cd to project directory
```bash
cd Lava
```

3. Rename `example.stack.env` to `stack.env`
```bash
mv example.stack.env stack.env
```
Fill out `stack.env`

4. Launch
```bash
docker compose up
```

Docker CLI

Make sure that Docker is installed on your computer or server already then:

1. Pull the image
```bash
docker pull ghcr.io/nat1anwastaken/lava:latest
```

2. Setup Lavalink, then fill IP and Port into `configs/lavalink.json`, if you're lazy to setup Lavalink, please use Docker Compose instead
```json
{
"host": "Lavalink IP",
"port": "Lavalink Port"
}
```

3. Create `stack.env` file, and fill in the following
```env
TOKEN=Bot Token
SPOTIFY_CLIENT_ID=Spotify client id
SPOTIFY_CLIENT_SECRET=Spotify client secret
```

4. Start to bot
```bash
docker run -it \
--name lava \
--volume "./configs:/app/configs" \
--env-file stack.env \
--restart unless-stopped \
ghcr.io/nat1anwastaken/lava:latest
```

> If you need to skip Spotify auto setup (`Go to the following url: ...`), you can set `SKIP_SPOTIFY_SETUP` to `1`

(back to top)

## Usage

After setting up the bot and invited it into your server, you can use `/play` to play music, as like in the example screenshot

Every command usage is explained in command description, you can learn how to use this bot by reading them

(Back to top)

## Configs
Lava provided a few simple customizble configs for you to custom your bot to your likings such as:

### Progress bar
You can modify `configs/icons.json` to set custom emoji for progress bar
```json
{
"empty": "⬛",
"progress": {
"start_point": "⬜",
"start_fill": "⬜",
"mid_point": "⬜",
"end_fill": "⬛",
"end_point": "⬛",
"end": "⬛"
},
"control": {
"rewind": "⏪",
"forward": "⏩",
"pause": "⏸️",
"resume": "▶️",
"stop": "⏹️",
"previous": "⏮️",
"next": "⏭️",
"shuffle": "🔀",
"repeat": "🔁",
"autoplay": "🔥"
}
}
```

### Status
You can modify `configs/activity.json` to set custom status
```json
{
"type": 0, // 0: Playing, 1: Streaming, 2: Listing, 3: Watching
"name": "Music", // Status text
"url": "" // Stream link (Only when using streaming staus)
}
```

(Back to top)

## ToDo

ToDo has been moved to [Projects][projects]

(Back to top)

## License

This project is licensed under MIT License, check `LICENSE.txt` for more information

(Back to top)

## Contributing

Head to [CONTRUBUTING.md](CONTRIBUTING.md) for detail

[contributors-shield]: https://img.shields.io/github/contributors/Nat1anWasTaken/Lava.svg?style=for-the-badge

[contributors-url]: https://github.com/Nat1anWasTaken/Lava/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/Nat1anWasTaken/Lava.svg?style=for-the-badge

[forks-url]: https://github.com/Nat1anWasTaken/Lava/network/members

[stars-shield]: https://img.shields.io/github/stars/Nat1anWasTaken/Lava.svg?style=for-the-badge

[stars-url]: https://github.com/Nat1anWasTaken/Lava/stargazers

[issues-shield]: https://img.shields.io/github/issues/Nat1anWasTaken/Lava.svg?style=for-the-badge

[issues-url]: https://github.com/Nat1anWasTaken/Lava/issues

[license-shield]: https://img.shields.io/github/license/Nat1anWasTaken/Lava.svg?style=for-the-badge

[license-url]: https://github.com/Nat1anWasTaken/Lava/blob/master/LICENSE.txt

[yeecord]: https://discord.gg/yeecord

[python]: https://python.org

[lavalink]: https://github.com/freyacodes/Lavalink

[projects]: https://github.com/users/Nat1anWasTaken/projects/3

[LavaLauncher]: https://github.com/Nat1anWasTaken/LavaLauncher

[spotipy-authorization-flow]: https://spotipy.readthedocs.io/en/2.22.0/#authorization-code-flow

[issues]: https://github.com/Nat1anWasTaken/Lava/issues

[player-screenshot-en]: img/player-en.png