Nyaughh / wa-fm-bot

8 stars 3 forks source link

WhatsApp Last.fm Song Tracking Bot

Table of Contents

Introduction

The WhatsApp Last.fm Song Tracking Bot is a TypeScript-based bot that allows users to track their listening habits on Last.fm via WhatsApp. By sending simple commands, users can get information about their currently playing track, recent tracks, top artists, and more directly through WhatsApp.

Features

Installation

Prerequisites

Steps

  1. Clone the repository:
    git clone https://github.com/Nyaughh/wa-fm-bot
  2. Change to the project directory:
    cd repo
  3. Install dependencies:
    npm install
    # or
    yarn install
  4. Create a .env file in the root directory and add your MongoDB URI, Last.fm API key and secret, Spotify client ID and secret, and YouTube API key:
    MONGO_URI=your_mongo_uri
    LASTFM_API_KEY=your_lastfm_api_key
    LASTFM_API_SECRET=your_lastfm_api_secret
    SPOTIFY_CLIENT_ID=your_spotify_client_id
    SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
    YOUTUBE_API_KEY=your_youtube_api_key
  5. Build the project:
    npm run build
    # or
    yarn build
  6. Start the bot:
    npm start
    # or
    yarn start

Usage

Once the bot is running, you can interact with it through WhatsApp using the following commands:

General Commands

LastFM Commands

Example usage:

User: !fms
Bot: "User" is currently listening to: "Spotify Song URL".

Issues

If you find a bug or have a feature request, please open an issue here.

Support

If you like this project, consider supporting us. Here are some ways you can help:

Acknowledgements