mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-22 19:15:27 +00:00
Revamp readme for dpy2 merge
This commit is contained in:
parent
cc1a91c67b
commit
bafcaf313f
35
README.md
35
README.md
|
@ -4,35 +4,50 @@ Next-gen rewrite of Kurisu/Robocop bot used on ReSwitched bot with discord.py re
|
|||
|
||||
Code is based on https://gitlab.com/a/dpybotbase and https://github.com/916253/Kurisu-Reswitched.
|
||||
|
||||
**This is the discord.py 2.0.0beta branch. It may be unstable. If you want the stable, discord.py 1.x.x based robocop-ng, see [the master branch](https://github.com/reswitched/robocop-ng/tree/master).**
|
||||
---
|
||||
|
||||
## How to migrate from discord.py v1 to v2
|
||||
|
||||
As of 18.08.2022 this repo is based on discord.py v2.
|
||||
|
||||
Only changes needed are updating your cogs and ensuring that all privileged intents are enabled for your bot.
|
||||
|
||||
You can find the privileged intents guide here: https://discordpy.readthedocs.io/en/latest/intents.html?highlight=intents#privileged-intents
|
||||
|
||||
You can see the migration instructions for your cogs here: https://discordpy.readthedocs.io/en/latest/migrating.html
|
||||
|
||||
---
|
||||
|
||||
## How to run
|
||||
|
||||
- Copy `robocop_ng/config_template.py` to `robocop_ng/config.py`, configure all necessary parts to your server.
|
||||
- Enable all privileged intents ([guide here](https://discordpy.readthedocs.io/en/latest/intents.html?highlight=intents#privileged-intents)) for the bot. You don't need to give Discord your passport as Robocop-NG is not designed to run at >1 guild at once, let alone >100.
|
||||
- (obviously) Add the bot to your guild. Many resources about this online.
|
||||
- Enable all privileged intents ([guide here](https://discordpy.readthedocs.io/en/latest/intents.html?highlight=intents#privileged-intents)) for the bot. You don't need to give Discord your passport as Robocop-NG is not designed to run in >1 guild at once, let alone >100.
|
||||
- (obviously) Add the bot to your guild. There are many resources about this online.
|
||||
- If you haven't already done this already, **move the bot's role above the roles it'll need to manage, or else it won't function properly**, this is especially important for verification as it doesn't work otherwise.
|
||||
- Install python3.6+.
|
||||
- Install python dependencies (`pip3 install -Ur requirements.txt`, you might need to put `sudo -H` before that). You can also install with [poetry](https://python-poetry.org/) with just `poetry install`.
|
||||
- If you're moving from Kurisu or Robocop: Follow `Tips for people moving from Kurisu/Robocop` below.
|
||||
- Run `robocop_ng/__init__.py` (`cd robocop_ng;python3 __init__.py`). Alternatively, if you did `poetry install`, run `python3 -m robocop_ng` in the same directory as your config files.
|
||||
|
||||
To keep the bot running, you might want to use pm2 or a systemd service.
|
||||
|
||||
### Alternatively, dockerization
|
||||
### Running with docker
|
||||
|
||||
- `docker build . -t robocopng`
|
||||
- Assuming your robocop-ng repo is on `~/docker/`: `docker run --restart=always -v ~/docker/robocop-ng:/usr/src/app --name robocop_ng robocopng:latest`
|
||||
|
||||
For updates I just `git pull;docker rm -f robocop_ng` then run the two commands above again.
|
||||
|
||||
### Running manually
|
||||
|
||||
- Install python3.8+.
|
||||
- Install python dependencies (`pip3 install -Ur requirements.txt`, you might need to put `sudo -H` before that). You can also install with [poetry](https://python-poetry.org/) with just `poetry install`.
|
||||
- Run `robocop_ng/__init__.py` (`cd robocop_ng;python3 __init__.py`). Alternatively, if you did `poetry install`, run `python3 -m robocop_ng` in the same directory as your config files.
|
||||
|
||||
To keep the bot running, you might want to use pm2 or a systemd service.
|
||||
|
||||
---
|
||||
|
||||
## Tips for people moving from Kurisu/Robocop
|
||||
|
||||
If you're moving from Kurisu/Robocop, and want to preserve your data, you'll want to do the following steps:
|
||||
|
||||
- Copy your `data` folder over.
|
||||
- Copy your `data` folder over into the `robocop_ng` folder.
|
||||
- Rename your `data/warnsv2.json` file to `data/userlog.json`.
|
||||
- Edit `data/restrictions.json` and replace role names (`"Muted"` etc) with role IDs (`526500080879140874` etc). Make sure to have it as int, not as str (don't wrap role id with `"` or `'`).
|
||||
|
||||
|
|
Loading…
Reference in a new issue