Git Product home page Git Product logo

musicbucket-bot's Introduction

MusicBucket Bot

full_logo

About

MusicBucket Bot is a Telegram Bot that adds features and possibility to interact with Spotify music links that users send in a chat.

Its main feature is to allow you to save links that someones shares in a Chat in a personal list. So you can easily track which music you have pending to listen to.

When an user sends a link, the bot is able to get information from a Spotify link like:

  • Artist
  • Album
  • Track
  • Genres
  • Audio preview

It also integrates with Last.fm to retrieve information about your user like Now Playing.

Why Telegram?

I chose Telegram because I'm in a few groups where we share music everyday. We soon realized that the links we shared in a group were often missed. Therefore, the idea of making a tool for keeping track of the music we share started growing so I started developing this bot.

Why Spotify?

At the start the bot supported both Spotify and Deezer, but Spotify is the platform that we use mostly, so implementing new features for both platforms became complicated and I decided supporting Spotify only.

Commands

  • /music [@username] Retrieves the music shared in the chat from the last week. Grouped by user. Filter by @username optionally.
  • /music_from_beginning @username Retrieves the music shared in the chat from the beginning of time by an user.
  • /savedlinks Retrieves a list with your saved links
  • /deletesavedlinks Shows a list of buttons for deleting saved links
  • /mymusic Retrieves the music that you shared in all the chats. It has to be called from a private conversation.
  • /topalbums [period](7day 'default'/1month/3month/6month/12month/overall) Top Albums. Returns the Last.fm top albums of your user.
  • /topartists [period](7day 'default'/1month/3month/6month/12month/overall) Top Artists. Returns the Last.fm top artists of your user.
  • /toptracks [period](7day 'default'/1month/3month/6month/12month/overall) Top Tracks. Returns the Last.fm top tracks of your user.
  • /np Now Playing. Returns track information about what you are currently playing in Last.fm.
  • /collage [rows] [cols] [period](7day 'default'/1month/3month/6month/12month/overall) Returns a collage of your most listened albums in a period.
  • /lastfmset username Sets a Last.fm username to your Telegram user.
  • /stats Retrieves an user list with a links counter for the current chat.
  • /help Retrieves a list of available commands and bot features.
  • @music_bucket_bot artist|album|track name Search for an artist, an album or a track and send it to the chat.

Official bot => @music_bucket_bot

Screenshots

screenshot_1

screenshot_3

screenshot_2 screenshot_4

Installation

  • Install pyenv and poetry
  • Do poetry install inside the folder.
  • Copy the .env.dist file to .env and fill the variables with your Telegram and Spotify data.
  • Execute python main.py

Special thanks

To the Sonomada community and its group in Telegram (https://t.me/Sonomada_gang) where we use and test the bot actively and propose new features.

License

The content of this project is licensed under the GNU/GPLv3 license. See LICENSE file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.