Discord bot for handling Ryujinx moderation tasks and such, (n)ext-(g)en rewrite of Robocop
Find a file
TSRBerry 147011eba1
Automatically block analysis of logs containing blocked contents in paths (#108)
* Extract paths from logs and check for blocked content

* Extract paths in command line analyzer

* Split disabled paths message if necessary

* Log the blocked path that caused a warning

* Remove duplicate command alias

* Remove bad characters from extracted filepaths

* Fix is_path_disabled() only checking the full path

* Apply formatting

* Improve wording for the warning embeds

* Apply formatting
2024-09-01 15:53:44 +02:00
.github Add Mako workflow (#98) 2024-05-15 17:19:24 +02:00
robocop_ng Automatically block analysis of logs containing blocked contents in paths (#108) 2024-09-01 15:53:44 +02:00
.dockerignore Fix .dockerignore patterns (#63) 2023-06-26 08:01:52 +02:00
.gitignore Fix .dockerignore patterns (#63) 2023-06-26 08:01:52 +02:00
default.nix Add nix flakes configuration 2023-12-31 21:42:14 +00:00
Dockerfile Change robocop_ng to have state directory differ from working directory 2023-04-05 12:10:18 +02:00
flake.lock Update dependencies 2024-05-15 17:30:55 +02:00
flake.nix Update dependencies 2024-05-15 17:30:55 +02:00
LICENSE Initial commit 2018-03-09 01:47:53 +03:00
poetry.lock Update dependencies 2024-05-15 17:30:55 +02:00
pyproject.toml Bump aiohttp from 3.9.1 to 3.9.3 (#87) 2024-03-02 09:54:37 +01:00
README.md Update README.md to make contributing easier (#80) 2023-11-20 19:49:39 +01:00
SECURITY.md im a bitch 2019-12-19 23:30:27 +10:00
shell.nix Add nix flakes configuration 2023-12-31 21:42:14 +00:00

ryuko-ng

Discord bot for handling Ryujinx moderation tasks and such, (n)ext-(g)en rewrite of Robocop

Code is based on https://github.com/reswitched/robocop-ng.


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 and configure all necessary parts for your server.
  • Enable all privileged intents (guide here) for the bot. You don't need to give Discord your passport as Ryuko-NG is not designed to run in >1 guild at once, let alone >100.
  • 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.
  • If you're moving from Kurisu or Robocop: Follow Tips for people moving from Kurisu/Robocop below.

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, run git pull;docker rm -f robocop_ng then run the two commands above again.

Running manually

  • Install python3.8+.
  • Install dependencies with poetry using poetry install.
  • Run robocop_ng/__main__.py (cd robocop_ng;python3 __main__.py).

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 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 ').

Contributing

Contributions are welcome. If you're unsure if your PR would be merged or not, ask in the Ryujinx discord guild pinging Berry.

You're expected to use black for code formatting before sending a PR. Simply install it with pip (pip3 install black), and run it with black ..


Credits

Ryuko-NG is a fork of Robocop-NG that is mainly maintained by @TSRBerry and @marysaka.

Robocop-NG was initially developed by @aveao and @tumGER. It is currently maintained by @aveao. Similarly, the official robocop-ng on the ReSwitched discord guild is hosted by @aveao too.

I would like to thank the following, in no particular order:

  • ReSwitched community, for being amazing
  • ihaveamac/ihaveahax and f916253 for the original kurisu/robocop
  • misson20000 for adding in reaction removal feature and putting up with my many BS requests on PR reviews
  • linuxgemini for helping out with Yubico OTP revocation code (which is based on their work)
  • Everyone who contributed to robocop-ng/ryuko-ng in any way (reporting a bug, sending a PR, forking and hosting their own at their own guild, etc).