A Discord bot for listening music from a Subsonic server.
Project description
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:
- Go to the Discord Developer Portal.
- Create a new application.
- On the application go to
Bot
. - Enable
Message Content Intent
. - And click on
Reset Token
to get string you should put on the env variable.
How to create an invite link
- Go to the Discord Developer Portal.
- Enter your bot application.
- On the application go to
OAuth2
. - Copy your
Client ID
. - Go to this preconfigured Discord Permissions Calculator.
- Paste your
Client ID
on the bottom. - 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
- Created with :heart: by Jorge "Kutu" Dobón Blanco.
- JmTexas19: Creator of Subrift, project forked that served as a base for Disopy.
- iGieri: Fix issue #1.
- outmaneuver: Fix issue #3.
- An May (YUR0ii): Make HTTPS optional.
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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3df7f7ca0c49e308ae82ed76636a155f8988fbd081088b412d306cdbc1e6a98b |
|
MD5 | 39cba1c5d75d55970c53dd66501b2356 |
|
BLAKE2b-256 | 4b40f4a9ef26effaf0a7e8de83fb778600b245babc0511dea6ec8929f8b1517e |
Provenance
The following attestation bundles were made for disopy-2.2.1.tar.gz
:
Publisher:
publish.yml
on kutu-dev/disopy
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
disopy-2.2.1.tar.gz
- Subject digest:
3df7f7ca0c49e308ae82ed76636a155f8988fbd081088b412d306cdbc1e6a98b
- Sigstore transparency entry: 149307373
- Sigstore integration time:
- Predicate type:
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f09a5c6da973792b18943c8d93232c7c835a352833f7df88322b9fdf91490895 |
|
MD5 | 3bca1d121af835ecb4182aef94f7056b |
|
BLAKE2b-256 | 3082efe34d2f324f847d6478822e7462356dfb5b2c59b00791a50a3bff71519b |
Provenance
The following attestation bundles were made for disopy-2.2.1-py3-none-any.whl
:
Publisher:
publish.yml
on kutu-dev/disopy
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
disopy-2.2.1-py3-none-any.whl
- Subject digest:
f09a5c6da973792b18943c8d93232c7c835a352833f7df88322b9fdf91490895
- Sigstore transparency entry: 149307374
- Sigstore integration time:
- Predicate type: