Skip to content

desmond27/TGLastFMBotV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TGLastFMBotV2

A simple Telegram bot that fetches information from Last FM. Re-written in Kotlin.

This project uses the TelegramBots library and my own Last FM wrapper library lfm4j.

See this bot in action: https://t.me/BlastFM_bot.

It does not need to be started. Just add to a chat and pass the commands given in the Bot comamnds section below.

Building

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/bot.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.

Bot commands

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.
/user <Last FM username> Returns the profile information of the user.
/topartists <Last FM username> Returns the top 10 artists of the user.
/topalbums <Last FM username> Returns the top 10 albums of the user.

About

A simple Telegram bot that fetches information from Last FM. Re-written in Kotlin.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages