A Telegram bot that helps chat users sharing and keeping track music

MusicBucket, updated 🕥 2023-02-11 01:48:06

MusicBucket Bot

.. |full_logo| image:: https://github.com/musicbucket/musicbucket-bot/blob/main/images/logos/musicbucket_bot_letter_logo.png?raw=True

|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| image:: https://github.com/paurieraf/musicbucket-bot/blob/master/images/screenshots/screenshot_1.jpg?raw=True .. |screenshot_2| image:: https://github.com/paurieraf/musicbucket-bot/blob/master/images/screenshots/screenshot_2.jpg?raw=True .. |screenshot_3| image:: https://github.com/paurieraf/musicbucket-bot/blob/master/images/screenshots/screenshot_3.jpg?raw=True .. |screenshot_4| image:: https://github.com/paurieraf/musicbucket-bot/blob/master/images/screenshots/screenshot_4.jpg?raw=True

================================ ================================ |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.

Issues

Bump ipython from 8.4.0 to 8.10.0

opened on 2023-02-11 01:48:05 by dependabot[bot]

Bumps ipython from 8.4.0 to 8.10.0.

Commits
  • 15ea1ed release 8.10.0
  • 560ad10 DOC: Update what's new for 8.10 (#13939)
  • 7557ade DOC: Update what's new for 8.10
  • 385d693 Merge pull request from GHSA-29gw-9793-fvw7
  • e548ee2 Swallow potential exceptions from showtraceback() (#13934)
  • 0694b08 MAINT: mock slowest test. (#13885)
  • 8655912 MAINT: mock slowest test.
  • a011765 Isolate the attack tests with setUp and tearDown methods
  • c7a9470 Add some regression tests for this change
  • fd34cf5 Swallow potential exceptions from showtraceback()
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/MusicBucket/musicbucket-bot/network/alerts).

Bump certifi from 2022.5.18.1 to 2022.12.7

opened on 2022-12-09 06:39:36 by dependabot[bot]

Bumps certifi from 2022.5.18.1 to 2022.12.7.

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/MusicBucket/musicbucket-bot/network/alerts).

Add CodeQL workflow for GitHub code scanning

opened on 2022-11-11 00:51:45 by lgtm-com[bot]

Hi MusicBucket/musicbucket-bot!

This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

Questions? Check out the FAQ below!

FAQ

Click here to expand the FAQ section #### How often will the code scanning analysis run? By default, code scanning will trigger a scan with the CodeQL engine on the following events: * On every pull request — to flag up potential security problems for you to investigate before merging a PR. * On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s *Security* tab up to date. * Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened. #### What will this cost? Nothing! The CodeQL engine will run inside GitHub Actions, making use of your [unlimited free compute minutes for public repositories](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#about-billing-for-github-actions). #### What types of problems does CodeQL find? The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the [`security-and-quality` query suite](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs) for you. #### How do I upgrade my CodeQL engine? No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version. #### The analysis doesn’t seem to be working If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please [follow the instructions here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow) to debug the analysis. #### How do I disable LGTM.com? If you have LGTM’s automatic pull request analysis enabled, then you can [follow these steps to disable the LGTM pull request analysis](https://lgtm.com/help/lgtm/managing-automated-code-review#disabling-pr-integration). You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com ([more info here](https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/)). #### Which source code hosting platforms does code scanning support? GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub. #### How do I know this PR is legitimate? This PR is filed by the official LGTM.com GitHub App, in line with the [deprecation timeline that was announced on the official GitHub Blog](https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/). The proposed GitHub Action workflow uses the [official open source GitHub CodeQL Action](https://github.com/github/codeql-action/). If you have any other questions or concerns, please join the discussion [here](https://github.com/orgs/community/discussions/29534) in the official GitHub community! #### I have another question / how do I get in touch? Please join the discussion [here](https://github.com/orgs/community/discussions/29534) to ask further questions and send us suggestions!

Add /genre command to list artists of this genre

opened on 2021-05-11 08:56:44 by paurieraf

Add /genre commands to return a list of most sent artists (or most populars) of this genre.

Usage example: /genre postrock

Revisar dependencias de node

opened on 2020-04-30 15:37:36 by sdecandelario

La dependencia node-sass lanza dos warnings:

warning node-sass > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 warning node-sass > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

Habría que mirar de actualizar la dependencia y ver si se puede eliminar request, revisar el enlace que indica en el mensaje de error.

A la hora de seguir un artista añadirlo si no existe

opened on 2020-04-20 08:29:56 by sdecandelario

Cuando sigues un artista con /followartist, si todavía no se ha enviado ningún enlace del artista y por lo tanto no existe en la base de datos se debería de crear en dicho momento

music music-bot telegram telegram-bot python python3 spotify deezer lastfm lastfm-api last-fm spotify-api spotify-connect musicbrainz music-information-retrieval telegram-bot-api telegram-bots telegrambot sqlite peewee