LyrixGram is a Telegram bot that allows you to search for song lyrics using the musiXmatch API. You can search by song title, artist name, or even lyrics. Additionally, the bot provides a "lucky" feature that randomly selects a song for you.
Before getting started, ensure that you have the following prerequisites in place:
- Python - version 3.9.2
pippackage manager- python-telegram-bot - Dependency
Follow these steps to install LyrixGram:
-
Follow these steps to install LyrixGram:
git clone https://github.com/thrama/lyrixgram.git
-
Install the required dependencies by running:
pip install -r requirements.txt
-
Create a
confs/settings.jsonfile and populate it with your API credentials for musiXmatch and your Telegram bot. The file structure should be as follows:{ "credentials": { "musicxmatch_apikey": "YOUR_MUSIXMATCH_API_KEY", "telegrambot_token": "YOUR_TELEGRAM_BOT_TOKEN" }, "view": { "max_items": 10 } }
Replace YOUR_MUSIXMATCH_API_KEY with your actual musiXmatch API key and YOUR_TELEGRAM_BOT_TOKEN with your Telegram bot token.
Note: The bot will create a log in the
lyrixgram.logfile.
To begin using LyrixGram, follow these steps:
-
To begin using LyrixGram, follow these steps:
python lyrixgram.py
If you want to run the script in the background, you can use this command:
nohup python lyrixgram.py $
-
Start a conversation with the bot on Telegram.
-
Use the following commands to interact with the bot:
/hello- Say hello to the bot./search <text>- Search for songs by text (title, artist name, or lyrics)./title <text>- Search for songs by title./lucky- Get a randomly selected song.
We welcome contributions from the community! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. For more details, refert to LICENSE file.