Skip to main content

A Discord bot for listening music from a Subsonic server.

Project description

Disopy

justforfunnoreally.dev badge PyPI - Version PyPI - Python Version

A Discord bot for listening music from a Subsonic server.

Setup

The only external dependencies needed are:

  • Python 3.13.0 or higher.
  • ffmpeg.
  • libopus.
  • libffi-devel.

Then just install the bot from PyPI with pipx:

pipx install disopy

Or directy with pip:

python3 -m pip install disopy

Finally generate a basic config file:

disopy --generate-config

It will be located at ${XDG_CONFIG_DIR}/disopy/config.toml (in most cases $HOME/.config/disopy/config.toml), remember to edit it with your configuration values.

Docker

There is an official Docker container with name ghcr.io/kutu-dev/disopy. An example compose file is also provided.

Running the bot

The bot needs two environment variables:

DISOPY_SUBSONIC_PASSWORD

The password to be send to the Subsonic REST API. Usually it'll be the same that you use to login in the WebUI of your Subsonic compatible server.

DISOPY_DISCORD_TOKEN

The token to be used when authenticating to the Discord API. To set up a bot on Discord follow this tutorial:

  1. Go to the Discord Developer Portal.
  2. Create a new application.
  3. On the application go to Bot.
  4. Enable Message Content Intent.
  5. And click on Reset Token to get string you should put on the env variable.

How to create an invite link

  1. Go to the Discord Developer Portal.
  2. Enter your bot application.
  3. On the application go to OAuth2.
  4. Copy your Client ID.
  5. Go to this preconfigured Discord Permissions Calculator.
  6. Paste your Client ID on the bottom.
  7. Copy and share your invite link at the bottom of the web!

And then just start the bot!

DISOPY_SUBSONIC_PASSWORD=foo DISOPY_DISCORD_TOKEN=bar disopy

Contributing

If you are interested in fixing bugs or adding new features please check the contributing guide.

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

disopy-2.2.1.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

disopy-2.2.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file disopy-2.2.1.tar.gz.

File metadata

  • Download URL: disopy-2.2.1.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for disopy-2.2.1.tar.gz
Algorithm Hash digest
SHA256 3df7f7ca0c49e308ae82ed76636a155f8988fbd081088b412d306cdbc1e6a98b
MD5 39cba1c5d75d55970c53dd66501b2356
BLAKE2b-256 4b40f4a9ef26effaf0a7e8de83fb778600b245babc0511dea6ec8929f8b1517e

See more details on using hashes here.

Provenance

The following attestation bundles were made for disopy-2.2.1.tar.gz:

Publisher: publish.yml on kutu-dev/disopy

Attestations:

File details

Details for the file disopy-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: disopy-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for disopy-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f09a5c6da973792b18943c8d93232c7c835a352833f7df88322b9fdf91490895
MD5 3bca1d121af835ecb4182aef94f7056b
BLAKE2b-256 3082efe34d2f324f847d6478822e7462356dfb5b2c59b00791a50a3bff71519b

See more details on using hashes here.

Provenance

The following attestation bundles were made for disopy-2.2.1-py3-none-any.whl:

Publisher: publish.yml on kutu-dev/disopy

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page