Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 2.21 KB

File metadata and controls

64 lines (53 loc) · 2.21 KB

TunifiedNXT

A Telegram bot to fetch the currently playing song from Last.fm and shares it on Telegram.

Available at TunifiedNXT


Preview:

Features:

  • Fetches the now playing song from Last.fm.
  • Utilizes YTMusicAPI to get the required CoverART for the tracks.
  • Posts the song details to a Telegram channel.
  • Updates the post every 5 seconds to reflect the current song (channels only).
  • Supports multiple channels.
  • 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.

2. Clone the repository:

    git clone https://github.com/Burhanverse/Tunified.git
    cd Tunified

3. Create a .env file in the root directory and add the following environment variables:

LASTFM_API_KEY=
LASTFM_SHARED_SECRET=
TELEGRAM_BOT_TOKEN=
MONGO_URI=

4. Get your Last.FM API KEY & SHARED SECERT from here 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.

5. Add the bot @myidbot to your chat or channel → send the command /getgroupid@myidbot and follow the instructions in the bot.

6. To get TELEGRAM_BOT_TOKEN, go to chat with @BotFather and send the command /newbot. Following the instructions. Upon completion, @BotFather will give you the bot token. Don't forget to add the bot to your channel.

7. Create a mongodb cluster for database.

8.Start the bot:

./start.sh