Giter Club home page Giter Club logo

disopy's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.