https://github.com/Burhanverse/Tunified
A Telegram bot that fetches the currently playing song from Last.fm and posts details about the song to a specified channel.
https://github.com/Burhanverse/Tunified
lastfm lastfm-now-playing music music-bot-telegram nodejs now-playing spotify-now-playing telegram-bot
Last synced: about 1 month ago
JSON representation
A Telegram bot that fetches the currently playing song from Last.fm and posts details about the song to a specified channel.
- Host: GitHub
- URL: https://github.com/Burhanverse/Tunified
- Owner: Burhanverse
- License: mit
- Created: 2024-07-09T08:35:01.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-03-12T11:19:59.000Z (about 1 month ago)
- Last Synced: 2025-03-12T12:25:48.905Z (about 1 month ago)
- Topics: lastfm, lastfm-now-playing, music, music-bot-telegram, nodejs, now-playing, spotify-now-playing, telegram-bot
- Language: JavaScript
- Homepage:
- Size: 164 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-grammY - Burhanverse/tunified - A Telegram bot to fetch the currently playing song from Last.fm and shares it on Telegram. (Bots)
README
![]()
TunifiedNXT
A Telegram bot to fetch the currently playing song from Last.fm and shares it on Telegram.
Available at TunifiedNXT---
### Preview:
![]()
### Features:
- [x] Fetches the now playing song from Last.fm.
- [x] Utilizes `YTMusicAPI` to get the required CoverART for the tracks.
- [x] Posts the song details to a Telegram channel.
- [x] Updates the post every 5 seconds to reflect the current song (channels only).
- [x] Supports multiple channels.
- [x] Supports group chats.---
### Prerequisites & Setup:
- Node.js v18+ installed.
- Python 3.11+ installed.
- Telegram Bot API token.
- MongoDB for database.
- Last.FM client installed in your phone for scrobbling tracks (it is recommanded to use pano scrobbler if you are on Android).
- Last.fm API key, Shared secret and username.
- Telegram Channel ID.1\. Download and install [Node.js](https://nodejs.org/en/download/).
2\. Clone the repository:
```bash
git clone https://github.com/Burhanverse/Tunified.git
cd Tunified
```
3\. Install dependencies:
```bash
npm install --include=dev
```
4\. Create a `.env` file in the root directory and add the following environment variables:
```env
LASTFM_API_KEY=
LASTFM_SHARED_SECRET=
TELEGRAM_BOT_TOKEN=
MONGO_URI=
```
5\. Get your Last.FM API KEY & SHARED SECERT from [here](https://www.last.fm/api/account/create) remember to login with the same account you use for scrobbling tracks as this will serve as the main source for the bot to display the current playing track data.6\. Add the bot [@myidbot](https://t.me/myidbot) to your chat or channel → send the command `/getgroupid@myidbot` and follow the instructions in the bot.
7\. To get `TELEGRAM_BOT_TOKEN`, go to chat with [@BotFather](https://t.me/BotFather) and send the command `/newbot`. Following the instructions. Upon completion, [@BotFather](https://t.me/BotFather) will give you the bot token. Don't forget to add the bot to your channel.
8\. Create a mongodb cluster for database.
9\.Start the bot:
```bash
python3 -m venv venv
```
```bash
source venv/bin/activate
```
```bash
npm start
```
---