MODiX is a moderation and analysis bot for discord. As for now, it just deals with moderation, but development should be driven towards analytics to reach our goal in the near future.
Issues are the center of MODiX´s development. You can see what features are being worked on in the issues and you can see which features are planned. You might also create issues to share problems/ideas.
Since we get a lot of "questions" regarding this, I think at that point, I should make some kind of statement about it.
Thanks to the cooperation of Cisien, we managed to get a REPL up and running. Aim was to keep it as open and flexible as possible while keeping the response & execution times as low as possible. We just had to restrict some namespaces and classes to minimize the risk of abuse and we were good.
Here is how its done:
- Modix receives !exec-Message
- Modix parses message, sends a HTTP Post-Request to Cisiens API
- Cisiens API filters some bad namespaces/types, then compiles and executes the code
- Cisiens API returns a JSON string which contains the results and some metadata
- Modix wraps the result into a structure using JsonConvert<>
- Modix returns the results to discord
Why we do it that way:
- Complete seperation between evaluation and discord bot
- Sandboxed environment for script execution
- Eliminating the risk of some compilation/execution crashing Modix
- Azure function restarts itself automagically when it crashes
Thats not how you should do it
It works fine so far.
You shouldn´t run a public REPL
We had no serious abuse after running it for almost 14 days.
Running it in the executing assembly would be way faster
And also result in REPL-Sessions that can potentially crash the bot.