Mahlarian / Sopharahsis

Repository for Sopharahsis Discord Bot
4 stars 0 forks source link

[FUTURE SUGGESTION] Code Evaluation #6

Closed Brittank88 closed 5 years ago

Brittank88 commented 5 years ago

There used to be an API that allowed for the execution of code in most programming languages: https://repl.it/site/blog/api-docs

It is currently down as they are working on a new one, but should this new API ever come out and be freely accessible, it could be a really cool feature for Soph to be able to (safely!) execute code for people and return the evaluation. It's a nice way to double-check the result of small pieces of code, and I've seen evaluation of small bits of code in servers before, so a bot to do it - but on a more universal scale - could be helpful.

Mahlarian commented 5 years ago

Sopharahsis already has an evaluation command that will execute JS code, however, you must have a special permission that only I can grant to be able to use this. I feel as though it may be too difficult to actually add some sort of filter to filter out malicious code, and it could result in very bad things happening if I miss something and someone uses an exploit to get the bot and/or my personal account banned. I am fully responsible for the actions other people do with my bot and I just don't feel comfortable with this.

Brittank88 commented 5 years ago

Understood - though I think this API might handle the safety-side of things itself. Ultimately it's not out yet anyways, so maybe this can be reconsidered (in terms of how safe it really is) when that comes out.

Totally understandable though - eval is always something that's a safety risk if not used properly.