Giter Site home page Giter Site logo

pixiv-discord-bot's Introduction

This bot is designed to poll character fanart from Pixiv and reupload it to Discord.

Setup

pip install -r requirments.txt

See config-example.json for an example config.

Regarding Password Authentication

Pixiv has removed password authentication, breaking the intended workflow for this program. As a temporary workaround, this bot now requires a valid refresh token to be written to a file named refresh, placed at the root of this repository.

The PixivPy developers are aware of this issue and have created a semi-auto way of extracting valid refresh tokens. See this gist for details.

Usage

./bot.py [options] <config_file>

This is a polling-based system, so you'll probably want to use cron or something similar to automatically run the script periodically.

Configuration

Each config file contains a "main tag" that is intended to be a series (e.g., game, TV show) and a list of "sub-tags" (e.g., characters). Picked images must be tagged with both the main tag and one or more sub-tags. If you want to grab images based on only one tag, you can have an empty sub-tags list and set wildcard to true.

wildcard controls whether the bot will additionally pick one image based solely on the main tag, without considering the sub-tags.

You can filter what kind of images are picked using allow_R18. If you don't know what this term means, you probably want to set allow to false.

You can create a Discord hook URL by going to a channel's settings and clicking Integrations->Webhooks->Create Webhook.

pixiv-discord-bot's People

Contributors

carter-yagemann avatar sabi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.