A simple Telegram bot that fetches information from Last FM.
This project uses the TelegramBots library and my own Last FM wrapper library lfm4j.
The lfm4j library mentioned above is NOT in the Maven repository and therefore you will have to clone it and run mvn install
to get this project to find it.
Also, before building, edit the src/main/resources/application.properties file and add the following details:
Property name | Description |
---|---|
TELEGRAM_BOT_TOKEN | Get from BotFather when creating your bot in Telegram. |
TELEGRAM_BOT_NAME | Whatever you set in BotFather after creating your bot. |
TELEGRAM_CREATOR_ID | Your Telegram id (not handle). You can get it from userinfobot. |
LAST_FM_API_KEY | Your Last FM API key. Get it after creating an API account here. |
LAST_FM_API_SECRET | Get it from the same link as for API key above. |
The bot understands the following commands:
Command | Description |
---|---|
/now <Last fm username> | Returns the currently playing or last played track by the given last fm user. |
/info <Last fm username> | Returns the profile information of the user. |