A Discord bot that plays YouTube playlists as a radio in voice channels.
- Play YouTube Playlists: Join a voice channel and play a YouTube playlist as a continuous stream of music.
- Simple Commands: Control the bot with simple commands like
!playand!stop. - Automatic Disconnect: The bot will automatically disconnect if it's the last one in the channel.
- Python 3.8+: Ensure Python is installed on your system. Check your version with:
python3 --version
- Git: Required to clone the repository.
-
Clone the Repository:
Clone the project to your local machine:
git clone git@github.com:ton-utilisateur/discord-radio-bot.git cd discord-radio-bot -
Create a Virtual Environment:
Set up a virtual environment to manage dependencies:
python3 -m venv venv source venv/bin/activate -
Install the Required Dependencies:
Install the necessary Python packages using pip:
pip install -r requirements.txt
-
Setup Environment Variables:
Copy the
.env.examplefile to.envand update it with your Discord bot token:cp .env.example .env
Open
.envin a text editor and replaceyour_token_herewith your actual Discord bot token:DISCORD_TOKEN=your_token_here
-
Run the Bot:
After setting up the environment and dependencies, you can start the bot with:
python bot.py
-
Bot Commands:
!play <YouTube Playlist URL>: The bot joins your voice channel and starts playing the playlist.!stop: Stops the music and disconnects the bot from the voice channel.
Here's a brief overview of the project's structure:
discord-radio-bot/
├── bot.py # Main bot script
├── requirements.txt # List of Python dependencies
├── .env.example # Example environment configuration
├── README.md # Project documentation
└── venv/ # Python virtual environment (not included in the repository)
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the discord.py community for their amazing library.
- Inspiration from various Discord bot projects available online.
- Features : Cette section décrit les fonctionnalités principales du bot.
- Getting Started : Explique comment configurer l'environnement pour développer ou utiliser le bot, y compris les prérequis, l'installation et la configuration des variables d'environnement.
- Usage : Fournit des instructions sur la manière d'utiliser le bot une fois qu'il est configuré.
- Project Structure : Offre une vue d'ensemble de la structure du projet pour aider les contributeurs à s'orienter rapidement.
- Contributing : Décrit le processus pour contribuer au projet.
- License : Informe les utilisateurs sur les conditions de licence du projet.
- Acknowledgments : Remercie les ressources et les personnes qui ont inspiré ou contribué à ce projet.
Ce README devrait te permettre de documenter ton projet de manière claire et accessible pour toi-même et pour d'éventuels contributeurs.