# Disopy
> A basic Discord bot for Subsonic
## Installation
```sh
$ pip install dispoy
$ disopy # First run to generate the default config file
```
_Disopy supports Python 3.11 and newer._
## Configuration
The cofig file is located in `$XDG_CONFIG_PATH/disopy/disopy.json`, in most cases you'll see it as `~/.config/disopy/disopy.json`. The default config file looks like this:
```json
{
"subsonic": {
"subsonicUrl": "https://",
"username": "",
"password": ""
},
"discordToken": "",
"caCertsPath": ""
}
```
Fill it up with your data. The deploy of the bot in Discord won't be covered in this document as it's already explained in the [Discord Developer Portal](https://discord.com/developers/docs/intro) and other sources. See [Custom certs](#custom-certs) for more info about self signed certificates.
## Using
After you have your Discord Application created and invited the bot to a server start it with:
```sh
$ disopy
```
Wait until it reports a successful connection to the Discord and Subsonic APIs, then enjoy the power of selfhosting using [slash commands](https://support.discord.com/hc/en-us/articles/1500000368501-Slash-Commands-FAQ) (`/command`) in a text channel. All slash commands are self-explanatory by its descriptions.
### Custom CA Certs
If you want to use custom certs you can point a unencrypted PEM file in `"caCertsPath"` in the [configuration](#configuration).
_Tip:_ If you just want to use the certificates installed in your machine instead of the ones bundled in the [`requests`](https://docs.python-requests.org/en/latest/user/advanced/#ca-certificates) package you can set it as `"caCertsPath": "/etc/ssl/certs/ca-certificates.crt"` and in most cases, it will work.
## Quirks
The [Subsonic API search implementation](http://www.subsonic.org/pages/api.jsp#search3) doesn't support playlists so the search for them is made with a plain substring search making it more difficult to find the desired playlist. If anyone makes a better implementation of it feel free to contribute to the project with it.
## Author
Created with :heart: by [Kutu](https://kutu-dev.github.io).
> - GitHub - [kutu-dev](https://github.com/kutu-dev)
> - Twitter - [@kutu_dev](https://twitter.com/kutu_dev)
Raw data
{
"_id": null,
"home_page": "https://github.com/kutu-dev/unipropic",
"name": "disopy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "web,utility,automation",
"author": "kutu-dev",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/1a/05/73dc79304de8643b5eb3845e1799d727ace91449655217a292a327c23e48/disopy-1.0.0.tar.gz",
"platform": null,
"description": "# Disopy\n\n> A basic Discord bot for Subsonic\n\n## Installation\n\n```sh\n$ pip install dispoy\n$ disopy # First run to generate the default config file\n```\n\n_Disopy supports Python 3.11 and newer._\n\n## Configuration\n\nThe cofig file is located in `$XDG_CONFIG_PATH/disopy/disopy.json`, in most cases you'll see it as `~/.config/disopy/disopy.json`. The default config file looks like this:\n\n```json\n{\n \"subsonic\": {\n \"subsonicUrl\": \"https://\",\n \"username\": \"\",\n \"password\": \"\"\n },\n \"discordToken\": \"\",\n \"caCertsPath\": \"\"\n}\n```\n\nFill it up with your data. The deploy of the bot in Discord won't be covered in this document as it's already explained in the [Discord Developer Portal](https://discord.com/developers/docs/intro) and other sources. See [Custom certs](#custom-certs) for more info about self signed certificates.\n\n## Using\n\nAfter you have your Discord Application created and invited the bot to a server start it with:\n\n```sh\n$ disopy\n```\n\nWait until it reports a successful connection to the Discord and Subsonic APIs, then enjoy the power of selfhosting using [slash commands](https://support.discord.com/hc/en-us/articles/1500000368501-Slash-Commands-FAQ) (`/command`) in a text channel. All slash commands are self-explanatory by its descriptions.\n\n### Custom CA Certs\n\nIf you want to use custom certs you can point a unencrypted PEM file in `\"caCertsPath\"` in the [configuration](#configuration).\n_Tip:_ If you just want to use the certificates installed in your machine instead of the ones bundled in the [`requests`](https://docs.python-requests.org/en/latest/user/advanced/#ca-certificates) package you can set it as `\"caCertsPath\": \"/etc/ssl/certs/ca-certificates.crt\"` and in most cases, it will work.\n\n## Quirks\n\nThe [Subsonic API search implementation](http://www.subsonic.org/pages/api.jsp#search3) doesn't support playlists so the search for them is made with a plain substring search making it more difficult to find the desired playlist. If anyone makes a better implementation of it feel free to contribute to the project with it.\n\n## Author\n\nCreated with :heart: by [Kutu](https://kutu-dev.github.io).\n\n> - GitHub - [kutu-dev](https://github.com/kutu-dev)\n> - Twitter - [@kutu_dev](https://twitter.com/kutu_dev)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A basic Discord bot to listen music using the Subsonic API",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/kutu-dev/unipropic"
},
"split_keywords": [
"web",
"utility",
"automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2a82ba0a520a55df8a460f10e25d4bfdd501f309d5ab9fbb0e23dc0651568447",
"md5": "c13932068e29d29a8014a6ad7af31398",
"sha256": "1595417049fd46d69bfa4e084e353cb453bd8a90ae8de2faa3ab764265ca16a7"
},
"downloads": -1,
"filename": "disopy-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c13932068e29d29a8014a6ad7af31398",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 10599,
"upload_time": "2023-07-19T23:42:27",
"upload_time_iso_8601": "2023-07-19T23:42:27.371984Z",
"url": "https://files.pythonhosted.org/packages/2a/82/ba0a520a55df8a460f10e25d4bfdd501f309d5ab9fbb0e23dc0651568447/disopy-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1a0573dc79304de8643b5eb3845e1799d727ace91449655217a292a327c23e48",
"md5": "0e1bc528e3880d2cc0f64216a052a2a2",
"sha256": "66fafc5faabc3144c0a0ccb4322f8399382fec00c569be6d25b9abf5de0cc530"
},
"downloads": -1,
"filename": "disopy-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0e1bc528e3880d2cc0f64216a052a2a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 9640,
"upload_time": "2023-07-19T23:42:29",
"upload_time_iso_8601": "2023-07-19T23:42:29.011461Z",
"url": "https://files.pythonhosted.org/packages/1a/05/73dc79304de8643b5eb3845e1799d727ace91449655217a292a327c23e48/disopy-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-19 23:42:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kutu-dev",
"github_project": "unipropic",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "disopy"
}