Giter VIP home page Giter VIP logo

bookshelf-traveller's Introduction

Bookshelf-Traveller

GitHub commit activity GitHub License

Buy Me A Coffee

A simple Audiobookshelf discord bot to help you manage your instance :)

You'll need to create your own discord application in order to do this, this is fairly straight forward, here is a guide:

Create a Discord App - Getting Started

Make sure that you select all intents when setting up your bot and that you have created a url to add it to your desired discord server.

Known Limitations

1) Ownership by default will allow you to run all commands (NOT ADMIN), to disable this, use the env variable OWNER_ONLY. No permissions have been setup yet, however, ill be working towards that.

2) When using commands that use images, i.e. /media_progress or /recent_sessions, the server must use an HTTPS connection due to a requirement from discord's API. If not, no image will be generated.

Environmental Variables

ENVIRONMENTAL VARS REQUIRED:

ENV Variables Description Type Required?
DISCORD_TOKEN Discord API Token String YES
bookshelfToken Bookshelf User Token (being an admin is required) String YES
bookshelfURL Bookshelf url with protocol and port, ex: http://localhost:80 String YES
OWNER_ONLY By default set to True. Only allow bot owner to use bot. Boolean NO
EPHEMERAL_OUTPUT By default set to True, this sets all commands to ephemeral (shown only to you) Boolean NO

Installation

Current Installation method is by docker container, however, you can also run main.py within a project folder.

Python Script

Requirements: Python 3.11 or above.

you'll also need an '.env' file for loading the above ENV Variables

pip install discord-py-interactions && pip install python-dotenv && pip install requests

Docker Container

Docker Container Available:

docker pull donkevlar/bookshelf-traveller

To run the container, paste the following command:

docker run -d \
--name bookshelf-traveller \
-e DISCORD_TOKEN="INSERT_TOKEN" \
-e bookshelfToken="INSERT_TOKEN" \
-e bookshelfURL="http://myurl.domain.com" \
donkevlar/bookshelf-traveller

Bot Commands

The following Commands are available:

By default, setup as '/' commands, or a.k.a app commands

Command Description Arguments Additional Information Additional Functionality
/add-user Will create a user, requires username, password name, password, user_type, optional: email
/all-libraries Displays all current libraries with their ID
/book-list-csv Get complete list of items in a given library, outputs a csv libraryid Autocomplete Enabled & Cover Images
/listening-stats Pulls your total listening time Will be expanded in the future.
/media-progress Searches for the media item's progress book_title Feautres autocomplete, simply type in the name of the book and it will return the name and ID for you. Autocomplete Enabled & Cover Images
/ping Displays the latency between your server and the discord server shard
/recent-sessions Will display up to 10 recent sessions in a filtered and formatted way.
/user-search Search for a specific user by name name current public release only has name, but ill update it to include search by ID, or by using the autocomplete Autocomplete Enabled
/test-connection Will test the connection of your bot to the audioboookshelf server optional: opt_url Optionally you can test the connection to any url.

Screenshots

Below are a few examples of the commands shown above.

img.png

img.png

img.png

bookshelf-traveller's People

Contributors

donkevlar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.