Skip to main content

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

Metadata

Release files for disopy 2.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for disopy 2.2.3
File Size Uploaded
disopy-2.2.3.tar.gz 21.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for disopy 2.2.3
File Interpreter ABI Platform
disopy-2.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / disopy-2.2.3.tar.gz

Download URL disopy-2.2.3.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
51fcc71fa09728b2d13f22e00599909adbdf161db24cb00ab9838243736db450
BLAKE2b-256 checksum
How to use checksums
23150053d28d46053a30f7938eaac12f4dabe0e81c01b087a4f72629518e9891
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2024.

Transparency log

Release files / disopy-2.2.3-py3-none-any.whl

Download URL disopy-2.2.3-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bc4cc7b44eca838b142c05bdeee70992aadd527747f90661d403dbd2c550471
BLAKE2b-256 checksum
How to use checksums
f7f39b47e1555901245e4b789d5d8f583124d9b9599a3891b196eef5724ea211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

2.2.3 This release

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page