Git Product home page Git Product logo

randibooru's Introduction

randibooru

standard-readme compliant

Pulls random images from Derpibooru for your Discord server's enjoyment.

Table of Contents

Install

Prerequisites

  • Python 3.5
  • pip
  • OPTIONAL: Knowledge of virtualenv

Instructions

  1. $ git clone https://github.com/BytewaveMLP/randibooru

  2. OPTIONAL: Set up a virtualenv in .env/

  3. $ pip install -r requirements.txt

    • NOTE: If you receive errors when pip is installing derpybooru, this is due to an upstream bug in DerPyBooru. The package maintainer has not been around to fix their setup.py script, so for now, you'll have to install both requests and derpybooru by hand, in that order using pip install. Sorry about this, but it's out of my hands.
  4. $ python3 randibooru.py

  5. $ $EDITOR config.ini

    Fill in your information for Derpibooru and Discord

    • Obtain a client ID and API key for Discord here
    • Obtain a Derpibooru API key here
  6. OPTIONAL: Make any additional changes to your configuration file

  7. $ python3 randibooru.py

  8. Complete and use this link to invite your instance of Randibooru to a server: https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=19456

    Alternatively, use the link generated in the console output of the bot.

If you don't want to set up Randibooru yourself, feel free to invite the public version of Randibooru to a server of your choice. Please do not overload the bot, however, as requests are logged. We will find you if you mess anything up!

Usage

Just run the configured command in chat (prefix + command). By default, this is !rb. Randibooru should handle the rest for you.

Maintainers

Contribute

We accept PRs! If you have a change you'd like to submit to us, let us know! We'll consider adding it if we feel it's useful. We advise using a virtualenv set up in .env/ to avoid polluting your global package space.

If you're reporting an issue, please make sure to follow the issue template provided. Also, consider checking our Trello first to ensure the issue isn't already being worked on, and make sure to avoid double-posting issues. If it's already been reported, we promise we'll get to it eventually!

License

Copyright (c) Eliot Partridge, 2016-17. Licensed under the MIT License.

randibooru's People

Contributors

antigravities avatar bytewavemlp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

randibooru's Issues

Double full image

For some reason now the default derpibooru.org links now show the full picture, leaving that with 2 full pictures, it needs to be fixed so it only shows 1 picture. (The file below is an example just for you to know what I mean)

ss 2017-01-15 at 08 55 38

Bot crashes on gifs without mp4/webm representations

Randibooru's backend library for interfacing with Derpibooru's API, DerPyBooru, has an issue where gif images without mp4 and webm representations can cause the bot to crash with a KeyError.

Possible solution:

except KeyError:
    client.send_message("There was an error processing your request. Please try again.")

Better solution: Fix upstream library DerPyBooru - unfortunately, the maintainer appears to be inactive

Testing issue xd

  • Randibooru version: public
  • Approximate time the issue was experienced: Now

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.