MusicDownloader-Telegram-Bot is a Telegram bot that allows users to download music/video from Spotify and YouTube. It provides a convenient way to access and download your favorite tracks/videos directly to your device.
You can test this bot at:
telegram.me/spotify_yt_downloader_bot
- Download music from Spotify links
- Search for songs on Spotify using keywords
- Supports different audio formats and qualities
- Option to select between SpotDL and YoutubeDL for downloading
- Broadcast messages to all users or specific subscribers
- Subscription management for users
- Voice recognition for song search
- Screenshot capture of tweets
- Download twitter media
- Download Instagram media
- Download Youtube media
Follow these steps to set up the MusicDownloader-Telegram-Bot
project on your system.
FFmpeg is required for audio processing. Here's how to install it on different operating systems:
sudo apt install ffmpeg
brew install ffmpeg
Download the FFmpeg build from Here. Extract the downloaded file and add the bin folder to your system's PATH.
To verify the installation, run:
ffmpeg -version
If you see version information, FFmpeg is installed correctly.
Open a terminal and clone the MusicDownloader-Telegram-Bot
repository from GitHub:
git clone https://github.com/AdibNikjou/MusicDownloader-Telegram-Bot.git
Navigate to the cloned repository's directory and install the required Python dependencies using pip
:
cd MusicDownloader-Telegram-Bot
pip install -r requirements.txt
Create a config.env
file in the root directory of the project and add the following environment variables:
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
BOT_TOKEN=your_telegram_bot_token
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
GENIUS_ACCESS_TOKEN=your_genius_access_token
With all dependencies installed and environment variables set, you can now run the bot:
python3 main.py
- Start a conversation with the bot by sending the
/start
command. - Share a Spotify link or use the
/search
command followed by a song title or lyrics to find and download music. - Use the
/settings
command to change the audio format and quality. - Subscribe to receive updates and news from the bot.
- Use the
/admin
command to access admin features (available only to authorized users).
/start
: Start the bot and get the welcome message./search <query>
: Search for songs on Spotify./settings
: Access settings to change audio format and quality, downloading core, and subscription./core
: Access directly to core settings to change downloading core./quality
: Access directly to quality settings to change audio format and quality./subscribe
: Subscribe to receive updates./unsubscribe
: Unsubscribe from updates./help
: Get help on how to use the bot./ping
: Check the bot's response time./stats
: Get statistics about the bot's usage./admin
: Access admin features.
/broadcast
: Send a message to all subscribed users or specific subscribers.- Ex:
/broadcast
-> Send a message to all subscribed users. - Ex:
/broadcast (1297994832,1297994833)
-> Send a message to 1297994832 and 1297994833 only. - Ex:
/broadcast_to_all
-> Send a message to all users.
- Ex:
/stats
: Get statistics about the bot's usage.
- Python 3.10+
- Telethon
- Spotipy
- Yt-dlp
- spotdl
- Shazamio
- Pillow
- dotenv
- aiosqlite
- lyricsgenius
- FastTelethonhelper
Contributions are welcome! Please feel free to submit a pull request or open an issue if you find any bugs or have suggestions for improvements.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any inquiries or feedback, please contact the creator:
- Telegram: @AdibNikjou
- Email: adib.n7789@gmail.com
- Spotify API for providing access to music metadata.
- Telegram API for the bot framework.
- Shazam API for voice recognition.
- YoutubeDL for downloading music from YouTube.