Semyonic / telegram-playlist-bot

Detects changes on given users Spotify playlist then sends track link as a message to Telegram users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

telegram-playlist-bot JavaScript Style Guide Codacy Badge

It was a toy project to share playlist changes to my friends following playlists.

Detects changes on given users Spotify playlist then sends added tracks to the Telegram users via bot. (Spotify doesn't support such Events,WebHooks currently)

Pre-Installation

  1. Obtain Telegram Bot API Token from BotFather @BotFather
  2. Create a Spotify Application from Developer Spotify

Installation

$ npm install

Then configure your .env file (Sample .env exists in this project)

Configuration

You can change polling frequency in .env file

.env Configuration Parameters

Name Description
TELEGRAM_BOT_TOKEN Your bot access token
TELEGRAM_ADMIN_ID Your Telegram ID (Stored in mongoDB after initializing chat with the bot)
SPOTIFY_ID Your Spotify Application ID
SPOTIFY_SECRET Your Spotify Application Secret
SPOTIFY_ID_ME Your Spotify Profile info (You can obtain via share profile button in Spotify App)
SPOTIFY_PLAYLIST_ID Your Spotify Playlist ID (You can obtain via share playlist button in Spotify App)
SPOTIFY_POLLING Polling frequency in MiliSeconds to check playlist changes (Be aware of Rate Limits !)
MONGO_URI Your mongoDB connection URL (You can use free 500mb from mLab)

Usage

npm start

License

MIT © Semih Onay

About

Detects changes on given users Spotify playlist then sends track link as a message to Telegram users

License:MIT License


Languages

Language:JavaScript 100.0%