Giter Site home page Giter Site logo

kurisu's Introduction

Kurisu

A Discord server bot developed for Nintendo Homebrew on Discord. Originally created by 916253, later updated by ihaveahax, and now is maintained primarily by NH staff and helpers.

Although it is open source, this bot is not really designed to be used in other setups at the moment; the source is mainly just available for those interested in how it works on the Nintendo Homebrew server.

Server template

A server template is available for testing Kurisu, with all the channels and roles necessary.

Setting up for local testing in Docker (recommended)

To test changes to Kurisu locally using Docker, make sure Docker Desktop (Windows and macOS) or Docker Engine (Linux) is installed.

For Linux, docker-compose must be installed separately.

Create a new application on Discord and add a bot. Put the token in token.txt in the same directory. (Newline at the end of the file doesn't matter.)

Start Kurisu with the following command. Assuming a clean setup, this will pull postgres:13 to run as the database, and python:3.8-slim-buster as the base image for Kurisu, then build a new Kurisu image. Then it will start up postgres first, then kurisu once the database is active.

docker-compose up --build

postgres database files are stored in ./kurisudb. Use Ctrl-C if not running in detached mode to stop the bot.

Other useful commands

  • docker-compose build - Build only, pull base images if required

  • docker-compose build --pull - Build only, always try to pull base images for newer versions

  • docker-compose pull - Pull images, in this case update postgres:13

  • docker-compose up -d - Detach and run containers in the background

  • docker-compose down - Stop running containers and remove them

Set up for local testing manually

  • Ever since the move to Docker and PostgreSQL this has not been as well tested, so tell us if something is wrong or confusing!

Set up PostgreSQL 13 or later (older versions aren't tested but might work).

Python 3.8 or later is required.

Install the dependencies in requirements.txt, ideally in a virtual environment.

Create a new application on Discord and add a bot.

Inside data/, create config.ini with the contents:

[Main]
token = <token for Discord bot>
database_url = <url of the database>

database_url should follow a format like postgresql://user:password@ipaddr/database (example: postgresql://kurisu:[email protected]/kurisu).

Run the bot:

python3 kurisu.py

kurisu's People

Contributors

916253 avatar aspargas2 avatar bleck9999 avatar chenzw95 avatar dependabot[bot] avatar dubyadud avatar eip618 avatar el-emmo avatar elpunical avatar frozenchen avatar glazedbelmont avatar griffing1 avatar hiperhazz avatar ihaveamac avatar inorishizuka avatar jasoncubed132 avatar jerbmega avatar jisagi avatar lightsage avatar lyricly avatar nightkingale avatar noirscape avatar novaphoenix avatar pbanj avatar phazonicridley avatar pixelsergey avatar t3chnolog1c avatar thedax avatar win9x-se avatar xarec 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.