The Github Thread

Desmond David

Destroy Erase Improve
Staff member
Admin
Started another project - desmond27/lfm4j

This is a Java wrapper for the Last FM API.

At first I wanted to create my own Last FM telegram bot with better privacy controls such as no access to all messages in the group. But implementing the Last FM API in that was proving to be a chore. So, I decided to create my own Last FM library first.

Currently you can get a user's info and a user's recent tracks. Everything else is still a WIP.
 
OP
thetechfreak

thetechfreak

Legend Never Ends
Started another project - desmond27/lfm4j

This is a Java wrapper for the Last FM API.

At first I wanted to create my own Last FM telegram bot with better privacy controls such as no access to all messages in the group. But implementing the Last FM API in that was proving to be a chore. So, I decided to create my own Last FM library first.

Currently you can get a user's info and a user's recent tracks. Everything else is still a WIP.
Will the bot work in groups? Because without message access on telegram I don't think you can make it work. Otherwise messaging 1 to 1 doesn't achieve anything no?
 

Desmond David

Destroy Erase Improve
Staff member
Admin
I will have to tweak the bot to only have limited commands and read messages. I will post the source code for that when I actually start working on the bot. For now though I am working on implementing a few more Last FM API calls in that library. Then I will use this library in the bot's server application to query Last FM in response to commands.
 

Desmond David

Destroy Erase Improve
Staff member
Admin
Some progress

Screenshot_20210516-033817.jpg


Gave it the name BlastFM for now. Can change it later. For now I am able to fetch simple user info as shown above.

However, the bot still receives all messages. Even though it only processes messages that are bot commands, all messages are added to the server log where they can be read. I am still trying to figure out how to workaround this behaviour.
 

Desmond David

Destroy Erase Improve
Staff member
Admin
How did you make this can you explain in more details?
The main component is the last FM wrapper library I am writing. I have described what that library does and my motivations for writing it in one of the previous posts.

The actual bot code itself is using this library: rubenlagus/TelegramBots. Look up the wiki in this repo to see how it works.

The bot code is kind of a mess right now, so I haven't pushed it to GitHub yet. Will add it in the future after polishing it up a bit.
 
Top Bottom