<div align="center" markdown="1">
<h1>Disopy</h1>
[![justforfunnoreally.dev badge](https://img.shields.io/badge/justforfunnoreally-dev-9ff)](https://justforfunnoreally.dev)
![PyPI - Version](https://img.shields.io/pypi/v/disopy)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/disopy)
A Discord bot for listening music from a Subsonic server.
</div>
## Setup
The only external dependencies needed are:
- Python 3.13.0 or higher.
- `ffmpeg`.
- `libopus`.
- `libffi-devel`.
Then just install the bot from [PyPI](https://pypi.org/) with [pipx](https://github.com/pypa/pipx):
```sh
pipx install disopy
```
Or directy with `pip`:
```sh
python3 -m pip install disopy
```
Finally generate a basic config file:
```sh
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`](https://github.com/kutu-dev/disopy/pkgs/container/disopy). An [example compose file](./compose.yaml) 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](https://discord.com/developers/applications).
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](https://discord.com/developers/applications).
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](https://discordapi.com/permissions.html#2184186880).
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!
```sh
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](./CONTRIBUTING.md).
## Acknowledgements
- Created with :heart: by [Jorge "Kutu" Dobón Blanco](https://dobon.dev).
- [JmTexas19](https://github.com/JmTexas19): Creator of [Subrift](https://github.com/JmTexas19/subrift), project forked that served as a base for Disopy.
- [iGieri](https://github.com/iGieri): Fix issue [#1](https://github.com/kutu-dev/disopy/issues/1).
- [outmaneuver](https://github.com/outmaneuver): Fix issue [#3](https://github.com/kutu-dev/disopy/issues/3).
- [An May (YUR0ii)](https://github.com/YUR0ii): Make [HTTPS optional](https://github.com/kutu-dev/disopy/pull/11).
Raw data
{
"_id": null,
"home_page": null,
"name": "disopy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13.0",
"maintainer_email": null,
"keywords": "bot, discord, music, opensubsonic, slash-commands, subsonic",
"author": null,
"author_email": "\"Jorge \\\"Kutu\\\" Dob\u00f3n Blanco\" <code@dobon.dev>",
"download_url": "https://files.pythonhosted.org/packages/53/c2/cf20aeafda05e0bf85f5d5436e2738ccf23d90c81101c7639bf62b6c89c6/disopy-2.2.2.tar.gz",
"platform": null,
"description": "<div align=\"center\" markdown=\"1\">\n<h1>Disopy</h1>\n\n[![justforfunnoreally.dev badge](https://img.shields.io/badge/justforfunnoreally-dev-9ff)](https://justforfunnoreally.dev)\n![PyPI - Version](https://img.shields.io/pypi/v/disopy)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/disopy)\n\nA Discord bot for listening music from a Subsonic server.\n</div>\n\n## Setup\nThe only external dependencies needed are:\n- Python 3.13.0 or higher.\n- `ffmpeg`.\n- `libopus`.\n- `libffi-devel`.\n\nThen just install the bot from [PyPI](https://pypi.org/) with [pipx](https://github.com/pypa/pipx):\n```sh\npipx install disopy\n```\n\nOr directy with `pip`:\n```sh\npython3 -m pip install disopy\n```\n\nFinally generate a basic config file:\n```sh\ndisopy --generate-config\n```\n\nIt 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.\n\n### Docker\nThere is an official Docker container with name [`ghcr.io/kutu-dev/disopy`](https://github.com/kutu-dev/disopy/pkgs/container/disopy). An [example compose file](./compose.yaml) is also provided.\n\n## Running the bot\nThe bot needs two environment variables:\n### `DISOPY_SUBSONIC_PASSWORD`\nThe 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.\n\n### `DISOPY_DISCORD_TOKEN`\nThe token to be used when authenticating to the Discord API. To set up a bot on Discord follow this tutorial:\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).\n2. Create a new application.\n3. On the application go to `Bot`.\n4. Enable `Message Content Intent`.\n5. And click on `Reset Token` to get string you should put on the env variable.\n\n#### How to create an invite link\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).\n2. Enter your bot application.\n3. On the application go to `OAuth2`.\n4. Copy your `Client ID`.\n5. Go to this preconfigured [Discord Permissions Calculator](https://discordapi.com/permissions.html#2184186880).\n6. Paste your `Client ID` on the bottom.\n7. Copy and share your invite link at the bottom of the web!\n\nAnd then just start the bot!\n```sh\nDISOPY_SUBSONIC_PASSWORD=foo DISOPY_DISCORD_TOKEN=bar disopy\n```\n\n## Contributing\nIf you are interested in fixing bugs or adding new features please check the [contributing guide](./CONTRIBUTING.md).\n\n## Acknowledgements\n- Created with :heart: by [Jorge \"Kutu\" Dob\u00f3n Blanco](https://dobon.dev).\n- [JmTexas19](https://github.com/JmTexas19): Creator of [Subrift](https://github.com/JmTexas19/subrift), project forked that served as a base for Disopy.\n- [iGieri](https://github.com/iGieri): Fix issue [#1](https://github.com/kutu-dev/disopy/issues/1).\n- [outmaneuver](https://github.com/outmaneuver): Fix issue [#3](https://github.com/kutu-dev/disopy/issues/3).\n- [An May (YUR0ii)](https://github.com/YUR0ii): Make [HTTPS optional](https://github.com/kutu-dev/disopy/pull/11).\n",
"bugtrack_url": null,
"license": null,
"summary": "A Discord bot for listening music from a Subsonic server.",
"version": "2.2.2",
"project_urls": {
"Changelog": "https://github.com/kutu-dev/disopy/blob/master/CHANGELOG.md",
"Issues": "https://github.com/kutu-dev/disopy/issues",
"Repository": "https://github.com/kutu-dev/disopy"
},
"split_keywords": [
"bot",
" discord",
" music",
" opensubsonic",
" slash-commands",
" subsonic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "11d5c17f605b2d3768d49e78be6a8bc80a62ad6d3f625bf73c379e722d10f35e",
"md5": "7670d54483d96b7150d0a2aa3b2fc3df",
"sha256": "f23854b503cadbc9be85307ca7c27fc3d3a50d0ea63bb1df1960ecff9cc5ea5e"
},
"downloads": -1,
"filename": "disopy-2.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7670d54483d96b7150d0a2aa3b2fc3df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13.0",
"size": 24096,
"upload_time": "2024-11-24T14:06:05",
"upload_time_iso_8601": "2024-11-24T14:06:05.010885Z",
"url": "https://files.pythonhosted.org/packages/11/d5/c17f605b2d3768d49e78be6a8bc80a62ad6d3f625bf73c379e722d10f35e/disopy-2.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "53c2cf20aeafda05e0bf85f5d5436e2738ccf23d90c81101c7639bf62b6c89c6",
"md5": "23366dc27a0164ace57f6f113aa31f9f",
"sha256": "6e67d15dbac24b746b924465076c7c32adf7cdac8cc7ca9a5e65810115ae5d39"
},
"downloads": -1,
"filename": "disopy-2.2.2.tar.gz",
"has_sig": false,
"md5_digest": "23366dc27a0164ace57f6f113aa31f9f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13.0",
"size": 21017,
"upload_time": "2024-11-24T14:06:06",
"upload_time_iso_8601": "2024-11-24T14:06:06.885867Z",
"url": "https://files.pythonhosted.org/packages/53/c2/cf20aeafda05e0bf85f5d5436e2738ccf23d90c81101c7639bf62b6c89c6/disopy-2.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-24 14:06:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kutu-dev",
"github_project": "disopy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "disopy"
}