This is a project that allows you to download music from Spotify via Telegram. The bot uses three languages: Ukrainian, Russian, and English. This repository was created and tested on Python3.10 and Ubuntu 22.04.3 LTS
1. Download the necessary files or clone this project anywhere
git clone https://github.com/dog1912/Spotify-Music-Downloader-Telegram-Bot.git
2. Сhange paramener to config.json
- YOUR PASSWORD - This is your password for authorisation. This bot isn't public because the api has a restriction.
- API_TOKEN - You can generate with BotFather
- SPOTIFY_CLIENT_ID - Spofify for developers
- SPOTIFY_CLIENT_SECRET - Spofify for developers
3. Setup a python script as a service through systemctl/systemd
vi /etc/systemd/system/telegram_bot.service (name of the service which is test in this case)
[Unit]
Description=Spotify Music Downloader Telegram Bot
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 bot.py
Restart=always
[Install]
WantedBy=multi-user.target
5. You need to reload the daemon
systemctl daemon-reload
6. To start a service at boot, use the enable command
systemctl enable telegram_bot.service
Feel free to send bug reports and feature requests. If you are using this solution in production please tell me to know it's being useful.