This project is a music-playing bot written in Python, mainly using the youtube-dl and yt-dlp libraries. It allows you to play music from various sources, with full support currently only for YouTube. To use the bot, you need to create a .env file at the root of the project to specify the bot token. List of required environment variables is provided in .env_example file. For convenient program launching, Docker can be used with the make command. The following list shows the available commands that the bot supports:
- Play: Used to connect and start playing. It accepts a link or a set of words. If the bot is already connected, it adds new tracks to the queue.
- Disconnect: Used to disconnect the bot and clear the queue.
- Stop: Clears the queue and stops the current playback.
- Skip: Skips the current track and moves on to the next one.
- Pause: Puts the connected bot on pause.
- Resume: Continues playing tracks that have been paused.
- List: Displays the queue of remaining tracks.
- Shuffle: Shuffles the queue randomly.
- NowPlaying: Displays the currently playing track with its time.
- Python 3.9
- youtube-dl and yt-dlp libraries
- discord.py library
- python-dotenv library
- dacite library
- A bot token from Discord
- Clone the repository using git clone https://github.com/Zewasik/Abobot.git
- Install the dependencies using pip install -r requirements.txt
- Create a .env file at the root of the project and add the following lines:
- BOT_TOKEN=<your_token>
- JSON_CONFIG_PATH=./config.json
- Run the bot using
python bot.py
or to use docker:make bot build
to build imagemake bot run
to run container
- Invite the bot to your Discord server using the invite link
- Use the available commands to play music, skip tracks, shuffle the queue, etc.
- Fork the project using the Fork button
- Create a new branch with your changes: git checkout -b my-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-feature
- Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.