• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

nh-server/Kurisu: Discord moderation bot for Nintendo Homebrew

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

nh-server/Kurisu

开源软件地址:

https://github.com/nh-server/Kurisu

开源编程语言:

Python 99.7%

开源软件介绍:

Kurisu

A Discord server bot developed for Nintendo Homebrew on Discord. 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.9-alpine 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 a Docker volume called kurisutestdb. 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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap