This project is a Telegram bot that allows users to download music directly from Spotify by sending a Spotify link to the bot. It supports downloading songs, albums, and playlists in different quality formats (128 kbps and 320 kbps).
- Download songs, albums, and playlists from Spotify.
- Choose download quality (128 kbps or 320 kbps).
- Automatically send downloaded music files to users via Telegram.
To run this bot, make sure you have the following installed:
- Python 3.7+
- SpotDL - A tool to download music from Spotify.
- python-telegram-bot - A Python library to interact with the Telegram API.
-
Clone the Repository Start by cloning the repository to your local machine:
git clone https://github.com/yourusername/yourrepository.git cd yourrepository
-
Install Dependencies Install the necessary dependencies using pip:
pip install -r requirements.txt
-
Configuration a) Set Up Telegram Bot Token:
Obtain your Telegram bot token from the BotFather on Telegram and add it to themain.py
file:BOT_TOKEN = 'YOUR_BOT_TOKEN'
b) SpotDL Configuration:
Ensure SpotDL is correctly installed and configured. Follow the SpotDL documentation for any additional setup if needed.
-
Run the Bot Start the bot by running:
python main.py
-
Using the Bot
- Start: Send
/start
to the bot to receive initial instructions. - Send Link: Send a Spotify link (song, album, or playlist) to the bot.
- Choose Quality: After sending the link, the bot will prompt you to choose the download quality (128 kbps or 320 kbps).
- Receive File: Once you select the quality, the bot will download and send the MP3 file to you.
- Start: Send
If you encounter any issues or have suggestions, feel free to open an issue in the Issues section. Contributions are welcome! If you'd like to contribute, please submit a pull request following the contribution guidelines.
This project is licensed under the MIT License.
Happy coding! 🎵🤖