kutu-dev / disopy

A basic Discord bot for Subsonic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disopy

A basic Discord bot for Subsonic

Installation

$ 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:

{
  "user": {
    "username": "",
    "password": ""
  },
  "subsonicUrl": "https://",
  "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 and other sources. See 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:

$ disopy

Wait until it reports a successful connection to the Discord and Subsonic APIs, then enjoy the power of selfhosting using slash commands (/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. Tip: If you just want to use the certificates installed in your machine instead of the ones bundled in the requests 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 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 ❤️ by Kutu.

About

A basic Discord bot for Subsonic.

License:MIT License


Languages

Language:Python 100.0%